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

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 A=eye(4,4);, which defines an identity matrix of dimension four in the MATLAB workspace. 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 A, and will convert the content of this matrix to LaTeX notation shown by this applet. 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 A in the MATLAB workspace. This applet window will show the current A-matrix every 3 seconds. This applet examines the MATLAB workspace for the matrix A periodically, and will convert the content of this matrix to LaTeX notation shown by this applet. Clicking on this equation will perform this immediately.

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

 First, clicking on this equation will define an A-matrix. Observe the red matrix below. Clicking on this equation will show the current A-matrix. Clicking on this equation will perform the calculation according to this formula. This applet window will show the current A-matrix every 3 seconds. 

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