Writing S-Functions | ![]() ![]() |
Syntax
Arguments
S
SimStruct representing an S-Function block.
name
Name of custom data type.
Description
Register a custom data type. Each data type must be a valid MATLAB identifier. That is, the first char is an alpha and all subsequent characters are alphanumeric or "_". The name
length must be less than 32. Data types must be registered in mdlInitializeSizes
.
If the registration is successful, the function returns the DataTypeId
associated with the registered data type; otherwise, it reports an error and returns INVALID_DTYPE_ID
.
After registering the data type, you must specify its size, using ssSetDataTypeSize
.
Example
The following example registers a custom data type named Color
.
Languages
See Also
ssSetDataTypeSize
![]() | ssRegAllTunableParamsAsRunTimeParams | ssSampleAndOffsetAreTriggered | ![]() |