| Contents | Index |
int_T ssSetIWorkValue(SimStruct *S, int_T idx, int_T value)
SimStruct representing an S-Function block.
Index of the element to be set.
New value of element.
The int_T value passed into the macro.
Sets the idx element of the S-function's integer work vector to value. The vector consists of elements of type int_T and is of length ssGetNumIWork(S). Typically, this vector is initialized in mdlStart or mdlInitializeConditions, updated in mdlUpdate, and used in mdlOutputs. You can use this macro in the simulation loop, mdlInitializeConditions, or mdlStart routines.
C, C++
The following statement
ssSetIWorkValue(S, 0, 1);
sets the first element of the work vector to 1.
ssGetNumIWork, ssGetIWork, ssGetIWorkValue

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