Writing S-Functions | ![]() ![]() |
Specify the number of continuous states that a block has.
C Syntax
void ssSetNumContStates(SimStruct *S, int_T n)
Ada Syntax
procedure ssSetNumContStates(S : in SimStruct; n : in Integer);
Arguments
S
SimStruct representing an S-function block.
S
.
Description
Use in mdlInitializeSizes
to specify the number of continuous states as 0, a positive integer, or DYNAMICALLY_SIZED
. If you specify DYNAMICALLY_SIZED
, you can specify the true (positive integer) width in mdlSetWorkWidths
, otherwise the width to is the width of the signal passing through the block. If your S-function has continuous states, it needs to return the derivatives of the states in mdlDerivatives
so that the solvers can integrate them. Continuous states are logged if the States option is checked on the Workspace I/O pane of the Simulation Parameters dialog box.
Languages
See Also
ssSetNumDiscStates, ssGetNumContStates
![]() | ssSetModeVectorValue | ssSetNumDiscStates | ![]() |