MLPutMatrix
Create or overwrite MATLAB matrix with data from Microsoft Excel worksheet
Description
Examples
Input Arguments
Tips
If
var_nameexists, theMLPutMatrixfunction replaces its contents with the contents ofmdat.Empty numeric data cells in
mdatbecome numeric zeros in the MATLAB matrix identified byvar_name.If any element of
mdatcontains string data,mdatbecomes a MATLAB cell array. Empty string elements inmdatbecomeNaNs in the MATLAB cell array.When using
MLPutMatrixin a subroutine, indicate the source of the worksheet data using the Microsoft® Excel macroRange. For example:Sub test() MLPutMatrix "a", Range("A1:A3") End SubIf you have a named range in your worksheet, you can specify the name instead of the range. For example:
Sub test() MLPutMatrix "a", Range("temp") End SubTo work with VBA code in Excel with Spreadsheet Link™, you must enable Spreadsheet Link as a reference in the Microsoft Visual Basic Editor. For details, see Installation.
Version History
Introduced before R2006a
