Technical Solutions
How do I load variables required in my Simulink model to the MATLAB workspace?
Date Last Modified: Tuesday, September 15, 2009
| Solution ID: | 1-15R59 | |
| Product: | Simulink | |
| Reported in Release: | R12.1 | |
| Platform: | All Platforms | |
| Operating System: | All OS |
Subject:
How do I load variables required in my Simulink model to the MATLAB workspace?
Problem Description:
When I load the Simulink demo "f14" by typing f14 from in the MATLAB command window, a Simulink model window is created and several variables are created in the MATLAB workspace. How are these variables created in the MATLAB workspace?
In general, how do I automatically load variables required in my Simulink model to the MATLAB workspace?
Solution:You can use the model's callbacks to load MAT files or to run MATLAB files. From the model explorer, you navigate to Model – Callbacks and place such commands here. Alternatively, you can set these model callbacks programmatically by use of the SET_PARAM command as shown below for the f14 model. |
|
|
Store

