Products & Services Solutions Academia Support User Community Company

Learn more about Spreadsheet Link EX   

MLGetFigure - Import current MATLAB figure into Microsoft Excel spreadsheet

Syntax

Worksheet:

MLGetFigure(width,height)

Macro:

MLGetFigure width, height

width

Specify the width in normalized units of the MATLAB figure when imported into an Excel worksheet.

height

Specify the height in normalized units of the MATLAB figure when imported into an Excel worksheet.

Description

Import the current MATLAB figure into an Excel worksheet, where the top-left corner of the figure is the current spreadsheet cell.

If worksheet calculation mode is automatic, MLGetFigure executes when you enter the formula in a cell. If worksheet calculation mode is manual, enter the MLGetFigure function in a cell, then press F9 to execute it. However, pressing F9 in this situation may also reexecute other worksheet functions and generate unpredictable results.

If you use MLGetFigure in a macro subroutine, enter MatlabRequest on the line after the MLGetFigure. MatlabRequest initializes internal Spreadsheet Link EX variables and enables MLGetFigure to function in a subroutine. Do not include MatlabRequest in a macro function unless the function is called from a subroutine.

Examples

Import the current MATLAB figure into an Excel worksheet. Adjust the width of the figure to be half that of the original figure, and the height to be a quarter that of the original figure:

MLGetFigure(.50,.25)

See Also

MLGetMatrix, MLGetVar

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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