[VCLab-Main] [Software] [Matlab Plugin][MM-File Execution Example]


MM-File Execution Example

The MM-file Execution Example shows

  • plugin embedding with color parameters and execution of an MM-file on page load
  • execution of an MM-file by the mEvalMFile method

Embedding and execution of bsp3.mm bsp3.mm
<EMBED SRC="bsp3.mm" NAME="matlab" WIDTH="500" HEIGHT="300" BGCOLOR="FFDDBB" FGCOLOR="804D40"> The MATLAB archive file contains
startup.m
% startup-file
load data
calc

calc.m
x=x*x'+eye(length(x));
Result=funbsp(x)

funbsp.m
function y = funbsp(xin)
y=sum(eig(xin'*xin));

data.mat
contains the column vector x with data
Below is the plugin window. On load the file startup.m has been executed.
The output shows the calculation result.
Execution of an MM-File bsp4.mm

Pressing the button will execute the MM-file bsp4.mm.

Source code:
<FORM><P>Pressing the button <INPUT TYPE="button" NAME="EvalMFileButton" VALUE="mEvalMFile('bsp4.mm')" ONCLICK="document.matlab.mEvalMFile('bsp4.mm')"> will execute the MM-file bsp4.mm.</P></FORM>
The MATLAB archive file contains
startup.m
% startup-file
load otherdata
calc

otherdata.mat
contains the column vector x with other data

[VCLab-Main] [Software] [Matlab Plugin][MM-File Execution Example]


©CS 1996, 1997, 1998, 2001