Excel Link |
 |
matlabsub
Evaluate MATLAB command given Excel data and designate output location
Syntax
Worksheet:
|
matlabsub(command, edat, inputs)
|
command
|
MATLAB command to evaluate. The MATLAB command must be written as "command" (in double quotes) .
|
edat
|
Worksheet location where the function writes the contents of var_name . "edat" (in quotes) directly specifies the location and it must be a cell address or a range name. edat (without quotes) is an indirect reference: the function evaluates the contents of edat to get the location. edat must be a worksheet cell address or range name.
|
inputs
|
Variable length input argument list passed to MATLAB command. Argument list may contain a range of worksheet cells that contain input data.
|
Description
Passes the command to MATLAB for evaluation given the function input data. The function returns a single value or string depending upon the MATLAB output. This function is intended for use as an Excel worksheet function.
To return an array of data to the VBA workspace, see MLEvalString
and MLGetVar
.
Caution
edat must not include the cell that contains the matlabsub function. In other words, be careful not to overwrite the function itself. Also make sure there is enough room in the worksheet to write the matrix contents. If there is insufficient room, the function generates a fatal error.
|
Examples
sums the data in worksheet cells B1
through B10
, returning the output to cell A1
.
See Also
matlabfcn
| matlabinit | | MLAppendMatrix |  |