Main Content

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 byS.

Description

Use inmdlInitializeSizesto 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 inmdlDerivativesso 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.cused insfcndemo_simomex.

Version History

Introduced before R2006a