matlabfcn - Evaluate MATLAB® command given Microsoft® Excel® data

Syntax

Worksheet:

matlabfcn(command, inputs)

command

MATLAB command to evaluate. Embed the command in double quotation marks; for example, "command".

inputs

Variable length input argument list passed to a MATLAB command. The argument list may contain a range of worksheet cells that contain input data.

Description

Passes the 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. The result is returned to the calling worksheet cell. This function is intended for use as an Excel® worksheet function.

Examples

  1. Add the data in worksheet cells B1 through B10, and then return the sum to the active worksheet cell:

    matlabfcn("sum", B1:B10) 
    
  2. Plot the data in worksheet cells B1 through B10, using x as the marker type:

    matlabfcn("plot", B1:B10, "x")
    

See Also

matlabsub

  


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