| Spreadsheet Link™ EX | ![]() |
Evaluate MATLAB® command given Microsoft® Excel® data and designate output location
Worksheet: | matlabsub(command, edat, inputs) |
command | MATLAB command to evaluate. Enter the MATLAB command in double quotation marks, as "command". |
edat | Worksheet location where the function writes the returned date. "edat" (in quotation marks) directly specifies the location and it must be a cell address or a range name. edat (without quotation marks) 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. This argument list can contain a range of worksheet cells that contain input data. |
Passes the specified command to the MATLAB workspace 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 theMicrosoft® Excel Visual Basic® for Applications (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. |
Sum the data in worksheet cells B1 through B10, and then return the output to cell A1:
matlabsub("sum", "A1", B1:B10)
![]() | matlabinit | MLAppendMatrix | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |