[VCLab-Main] [Software] [MATLAB Plugin]
|The MATLAB Plugin performs communications with MATLAB. It provides mechanisms to do computations in the MATLAB Workspace, to emulate the MATLAB command window output and to put and get data to and from the Workspace.|
---- Visibility ---- Keys and Parameters
Methods ---- Examples
Loading a page with an embedded MATLAB Plugin will start MATLAB in the background on the first load. Depending on the plugin parameters MATLAB will execute statements, which will come with the plugin load. A Java class with a set of methods for MATLAB communication and MATLAB execution on the page are available.
The Plugin consists of the dynamic link library NPVCLab.dll and the Java class VCLabPlugin.class, which both reside in the browser plugin directory. The software is installed with the VCLab installer, as shown in the installation guide.
The plugin can be embedded using different parameters, which influence
the startup and visual layout. If the MATLAB command output should be
visualized, the embedding by
may be used. The plugin will load the M-file file.m specified by the SRC key and MATLAB will execute it. The output will be printed in the plugin window, for which the size by HEIGHT and WIDTH is given.
It is also possible, not to specify an M-file but to specify the MIME-type of the plugin. This is performed by the TYPE key
This enables the browser to load this plugin. There is no way at least so far to specify a plugin by its name.
In standard plugin embedding the keyword HIDDEN determines the visibility of the plugin window. Due to internal causes, this key is not allowed with this plugin. Instead of this key, the user key DISPLAY must be used. If the parameter is set to "false" the plugin's window is inactive, but the plugin is still running in the background.
This mechanism enables to keep the contact with the MATLAB engine without showing output. The WIDTH and HEIGHT parameter can be set to a small value. This makes it easy to hide the output of MATLAB from the user.
SRC = "URL"If this parameter is specified, a file will be loaded from the URL as given by the source key.
If the file specified in the URL has the extension .m, this file will be executed in the MATLAB workspace. If the file comes from a server, it will be copied before execution to the MATLAB working directory (default: browser cache). If this file is on the browser client, the MATLAB working directory will be set to the file directory before execution.
If the file specified in the URL has the extension .mm, this file is a MATLAB archive. The files in this archive will be extracted to the MATLAB working directory (default: browser cache). If this archive contains the file startup.m or astart.m, this will be executed in the MATLAB workspace.
MM-files may contain any type of files needed for MATLAB execution. The archive format is the standard uncompressed ZIP-format.
TYPE = "application/x-matlab"The plugin will be specified by its MIME-type. This loads only the plugin, but does not start any MATLAB operation.
NAME = "name"The name is given to identify the plugin for referencing the plugin methods.
DISPLAY = "mode"If false specified, the plugin window is inactive. The WIDTH and HEIGHT parameter can be specified as small as possible, but not zero.
FGCOLOR = "rrggbb"The plugin window default foreground text color (default: green) can be modified by the hex value rrggbb
BGCOLOR = "rrggbb"The plugin window default background color (default: white) can be modified by the hex value rrggbb
STARTUP = "mode"If true specified, an matlab command sequence will be executed on startup. This sequence will be specified by the installer.
This method loads an M- or MM-file over the web and executes it in the MATLAB workspace. For the MATLAB working directory see the source key syntax in the EMBED tag.
This method executes an M- or MM-file in the MATLAB workspace given by the MFilePath. The MFilePath specifies a file path on the client computer system. For the MATLAB working directory see the source key syntax in the EMBED tag.
The string specified by evalString will be executed in the MATLAB workspace. This is the remote version of the MATLAB eval command.
|Boolean Expression Evaluation||
The function will return the boolean value of the scalar boolean expression specified in evalString.
|Remove Variable in Workspace||
Removes the MATLAB workspace variable given by NameString.
Removes all from the MATLAB workspace.
|Get Matrix from Workspace||
This function gets the matrix specified by MatrixName from the workspace and stores it in the plugin matrix storage. The function returns this matrix described by a string in the LaTeX array notation as specified by the HotEqn applet.
|Get a Scalar Variable from Workspace||
This function gets the matrix specified by MatrixName from the workspace and stores it in the plugin matrix storage. The function returns the (m,n)-element of the matrix. Low index is 1.
|Get a Scalar String Variable from Workspace||
This function gets the string matrix specified by MatrixName from the workspace and stores it converted into equivalent double values in the plugin matrix storage. The function returns the m-th element of the string matrix as a string. Low index is 1.
|Put Matrix to Workspace||
Puts the matrix stored in the plugin matrix storage to the workspace and assigns it the variable name given by MatrixName. If this operation is successful the function returns true, otherwise false.
|Matrix to LaTeX Conversion||
The function returns the matrix stored in the plugin matrix storage described by a string in the LaTeX array notation as specified by the HotEqn applet.
|LaTeX to Matrix Conversion||
The array given in LaTeX notation in LaTeXString is converted to a matrix and stored in the plugin matrix storage.
|Get Matrix Number of Rows||
Function returns the number of rows of the matrix stored in the plugin matrix storage.
|Get Matrix Number of Columns||
Function returns the number of columns of the matrix stored in the plugin matrix storage.
|Set User Level||
The user level value will be set internal in the plugin and stored in the MATLAB workspace variable UserLevel.
|Get User Level||
The user level value will be returned from the plugin storage.
|Get MATLAB Version||
Return the decimal number of the current MATLAB version.
|Get Plugin Version||
Returns the decimal number of the current Plugin version.
|Get Java Version||
Returns the decimal number of the current Plugin Java methods version.
[VCLab-Main] [Software] [MATLAB Plugin]