MATLAB Function Block Basics
Use MATLAB Function block to implement MATLAB functions to Simulink models to deploy code and embed code in processors. Using MATLAB Function block, you can generate readable, efficient, and compact C/C++ code for deployment to desktop and embedded applications.
|MATLAB Function Block Editor||Create, edit, and debug MATLAB code in MATLAB Function blocks|
|MATLAB Function||Include MATLAB code in models that generate embeddable C code|
Simulink Configuration Parameters
Add MATLAB functions to Simulink models.
Follow workflow for integrating a MATLAB Function block in a Simulink model.
Manage implicit signal resolution at various levels of the model hierarchy.
Run simulations and generate code with models using custom MATLAB Function blocks in a library.
Integrate a MATLAB Function block into your Simulink model.
Use MATLAB Function blocks to call and execute code written in MATLAB function files.
Use MATLAB Function blocks to call external C code and control enumeration and bus typedefs.
Debug MATLAB Function block code during simulation.
Adhere to restrictions for using MATLAB Function blocks, Stateflow® charts, and Truth Tables in feedback loops.
Specialized semantics impact the way that a function initializes persistent data.