| Excel Link | ![]() |
What the Functions Do
With Excel Link, Microsoft Excel becomes an easy-to-use data-storage and application-development front end for MATLAB, which is a powerful computational and graphical processor.
Excel Link provides functions to manage the link and to manipulate data. You never have to leave the Excel environment. You can invoke functions as worksheet cell formulas or in macros.
See Function Reference for details on each function.
Link Management Functions
Excel Link provides four link management functions to initialize, start, and stop Excel Link and MATLAB.
|
Initialize Excel Link and start MATLAB process. |
|
Automatically start MATLAB process. |
|
Terminate MATLAB process. |
|
Start MATLAB process. |
You can invoke any link management function except matlabinit as a worksheet cell formula or in a macro. You invoke matlabinit from the Excel Tools Macro menu or in a macro subroutine.
Use MLAutoStart to toggle automatic startup. If you install and configure Excel Link according to the default instructions, Excel Link and MATLAB automatically start every time you start Excel. If you choose manual startup, use matlabinit to initialize Excel Link and start MATLAB.
Use MLClose to stop MATLAB without stopping Excel, and use MLOpen or matlabinit to restart MATLAB in the same Excel session.
Data Management Functions
Excel Link provides nine data management functions to copy data between Excel and MATLAB and to execute MATLAB commands from Excel.
|
Evaluate MATLAB command given Excel data. |
|
Evaluate MATLAB command given Excel data and designate output location. |
|
Create or append MATLAB matrix with data from Excel worksheet. |
|
Delete MATLAB matrix. |
|
Evaluate command in MATLAB. |
|
Write contents of MATLAB matrix in Excel worksheet. |
|
Write contents of MATLAB matrix in Excel VBA (Visual Basic for Applications) variable. |
|
Create or overwrite MATLAB matrix with data from Excel worksheet. |
|
Create or overwrite MATLAB matrix with data from Excel VBA variable. |
You can invoke any data management function except MLGetVar and MLPutVar as a worksheet cell formula or in a macro. You can invoke MLGetVar and MLPutVar only in a macro.
Use MLAppendMatrix, MLPutMatrix, and MLPutVar to copy data from Excel to MATLAB.
Use MLEvalString to execute MATLAB commands from Excel.
Use MLDeleteMatrix to delete a MATLAB variable.
Use matlabfcn, matlabsub, MLGetMatrix and MLGetVar to copy data from MATLAB to Excel.
| Stopping Excel Link | Tips and Reminders | ![]() |