Excel Link | ![]() ![]() |
Create or overwrite MATLAB matrix with data from Excel VBA variable
Syntax
MLPutVar ML_var_name, VBA_var_name
Description
Creates or overwrites matrix ML_var_name
in MATLAB workspace with data in VBA_var_name
. Creates ML_var_name
if it does not exist. If ML_var_name
already exists, this function replaces the contents with data from VBA_var_name
. VBA_var_name
can contain either numeric data or string data but not both. Use MLPutVar
only in a macro subroutine, not in a macro function or in a subroutine called by a function.
Example
creates or overwrites MATLAB matrix K
with the data in the VBA variable DataK
.
See Also
![]() | MLPutMatrix | Error Messages and Troubleshooting | ![]() |