| Embedding and
execution of bsp1.m |
bsp1.m |
<EMBED SRC="bsp1.m"
NAME="matlab" WIDTH="500" HEIGHT="300"> |
% example 1
a=[1,2;3,4]
b=[2,2] |
Below is the plugin window. On load the file bsp1.m has
been executed. The output shows the definition of the matrices a and b.
|
|
| Execution of an
M-File |
bsp2.m |
|
|
% example 2
c=b*a |
Source
code:
<FORM>Pressing the button <INPUT TYPE="button"
NAME="EvalMFileButton" VALUE="mEvalMFile('bsp2.m')"
ONCLICK="document.matlab.mEvalMFile('bsp2.m')">
will execute the M-file bsp2.m.</FORM> |
|
| MATLAB Command Execution |
Source code: <FORM>Pressing the button INPUT TYPE="button"
NAME="EvalStringButton" VALUE="mEvalString('a*eig(a)')"
ONCLICK="document.matlab.mEvalString('a*eig(a)')">will
execute the MATLAB statement a*eig(a)</FORM> |