ssSetNumContStates
Specify the number of continuous states that a block has
Syntax
void ssSetNumContStates(SimStruct *S, int_T n)
Arguments
-
S
-
SimStruct representing an S-Function block.
-
n
-
Number of continuous states to be set for the block represented by
S
.
Description
Use inmdlInitializeSizes
to specify the number of continuous states as 0, a positive integer, orDYNAMICALLY_SIZED
. If you specifyDYNAMICALLY_SIZED
, you can specify the true (positive integer) width inmdlSetWorkWidths
;否则,使用宽度是si的宽度gnal passing through the block. If your S-function has continuous states, it needs to return the derivatives of the states inmdlDerivatives
so that the solvers can integrate them. Continuous states are logged if theStatesoption is selected on theData Import/Exportpane of the Configuration Parameters dialog box.
Languages
C, C++
Example
See the S-functionsimomex.c
used insfcndemo_simomex
.