| Writing S-Functions | ![]() |
Get a block's discrete states.
Syntax
real_T *ssGetDiscStates(SimStruct *S)
Arguments
S
SimStruct representing an S-function block.
Description
Returns a block's discrete state vector has an array of real_T elements of length ssGetNumDiscStates(S). Typically, the state vector is initialized in mdlInitializeConditions, updated in mdlUpdate, and used in mdlOutputs. You can use this macro in the simulation loop, mdlInitializeConditions, or mdlStart routines.
Languages
See Also
ssGetNumDiscStates, mdlInitializeConditions, mdlUpdate, mdlOutputs, mdlStart
| ssGetDataTypeZero | ssGetDTypeIdFromMxArray | ![]() |