Introduction
About SimStruct Functions
The Simulink software provides a set of functions for accessing
the fields of an S-function's simulation data structure (SimStruct).
S-function callback methods use these functions to store and retrieve
information about an S-function.
Back to Top
Language Support
Some SimStruct functions are available only
in some of the languages supported by the Simulink software.
The reference page for each SimStruct macro or
function lists the languages in which it is available and gives the
syntax for these languages.
Note
Most SimStruct functions available in C are
implemented as C macros. Individual reference pages indicate any SimStruct macro
that becomes a function when you compile your S-function in debug
mode (mex -g). |
Back to Top
The SimStruct
The file simstruc.h is
a C language
header file that defines the Simulink data structure and the SimStruct access
macros. It encapsulates all the data relating to the model or S-function,
including block parameters and outputs.
There is one SimStruct data structure allocated
for the Simulink model. Each S-function in the model has its
own SimStruct associated with it. The organization
of these SimStructs is much like a directory tree.
The SimStruct associated with the model is the root SimStruct.
The SimStructs associated with the S-functions
are the child SimStructs.
Back to Top
 | S-Function SimStruct Functions Reference | | SimStruct Macros and Functions Listed by Usage |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit