[VCLab-Main] [Software][HotEqn][Interactive Equations]

**mHotEqn** is able to replace expressions with
matrix data from the MATLAB workspace. MATLAB statements or m-files can be
executed on demand by clicking with the left mouse button in the applet
windows. Below, between this text and the **Example** heading is a tiny
hidden window of the MATLAB Plugin, which is necessary to be embedded for
MATLAB communication purposes.

**Example:**

First, clicking on this equation will define an A-matrix. Observe the red matrix below. |
Clicking with the left mouse button on this
equation will execute the MATLAB statement |

Clicking on this equation will show the current A-matrix. |
Clicking with the left mouse button on this
equation will examine the MATLAB workspace for the matrix |

Clicking on this equation will perform the calculation according to this formula. |
Clicking with the left mouse button on this
equation will execute the MATLAB m-file calca.m, which modifies the matrix |

This applet window will show the current A-matrix every 3 seconds. |
This applet examines the MATLAB workspace for the
matrix |

Let's have a look at the **HTML code** of this
example.

First, clicking on this equation will define <applet code=mHotEqn.class height=35 width=300 name="definition of A" align=absmiddle MAYSCRIPT> <param name="leftside" value="A"> <param name="rightside" value="\mbox{eye}(4,4);"> <param name=" |

**Description:**

The first applet uses the **mEvalString** parameter
to execute the MATLAB statement **A=eye(4,4);**. The third applet is similar
to this, but uses the **mEvalMFile** parameter to execute the m-file
**calca.m**. As no path is given to this file, it must be located on the
directory of this document.

The second applet retrieves the matrix **A** from the
MATLAB workspace using the **mGetArray** parameter. The fourth applet has
the same functionality but additionally with periodic updating. Thus the
parameters are the same plus the **update** parameter, which specifies an
update interval of **3000** milliseconds.

[VCLab-Main] [Software][HotEqn][Interactive Equations]

© CS 1998 , 2001, 2003