Variables in MATLAB Function Blocks
Define block variables for MATLAB Function blocks
Define variables in MATLAB Function blocks in your function code. Adjust function variable properties to access sources of data in and outside of your Simulink® models.
Tools
| MATLAB Function Block Editor | Create, edit, and debug MATLAB code in MATLAB Function blocks |
Blocks
| MATLAB Function | Include MATLAB code in Simulink models |
Objects
MATLABFunctionConfiguration | MATLAB Function block property configuration |
Stateflow.EMChart | Stateflow interface to MATLAB Function block |
Topics
- Create MATLAB Function Block Variables
Use MATLAB Function block variables to modify data input to the block, or to output modified data to the model.
- Set Properties for MATLAB Function Block Variables
Use the Property Inspector or the Model Explorer to define properties of MATLAB Function block variable properties.
- Access Workspace Data in MATLAB Function Blocks by Using Parameter Variables
Pass Simulink parameters and MATLAB® variables to a MATLAB Function block.
- Access Data Store Data in MATLAB Function Blocks
Access data store data in a MATLAB Function blocks by using global variables.