MLEvalString - Evaluate command in MATLAB® software

Syntax

Worksheet:

MLEvalString(command)

Macro:

MLEvalString command

command

MATLAB command to evaluate. "command" (in quotation marks) directly specifies the command. command (without quotation marks) is an indirect reference: the function evaluates the contents of command to get the command, and command must be a worksheet cell address or range name.

Description

Passes a command string to the MATLAB software for evaluation. The specified action alters only the MATLAB workspace. It has no effect on the Microsoft® Excel® workspace.

Examples

Divide the MATLAB variable b by 2, and then plot it:

MLEvalString("b = b/2;plot(b)") 

This command only modifies the MATLAB variable b. To update data in the Excel® worksheet, use MLGetMatrix.

See Also

MLGetMatrix

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS