| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
void ssSetNumContStates(SimStruct *S, int_T n)
SimStruct representing an S-Function block.
Number of continuous states to be set for the block represented by S.
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 used 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 selected on the Data Import/Export pane of the Configuration Parameters dialog box.
C, C++
See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/simomex.c used in sfcndemo_simomex.mdl.
ssSetNumDiscStates, ssGetNumContStates
![]() | ssSetModeVectorValue | ssSetNumDiscStates | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |