Writing S-Functions | ![]() ![]() |
Get an element of a block's floating-point work vector.
Syntax
Arguments
S
SimStruct representing an S-Function block.
idx
Index of the element returned by this function
Description
Returns the idx
element of the the floating-point work vector used by the block represented by S
. The vector consists of elements of type real_T
and is of length ssGetNumRWork(S)
. Typically, this vector is initialized in mdlStart
or mdlInitializeConditions
, updated in mdlUpdate
, and used in mdlOutputs
. You can use this macro or ssGetRWork
to get the current values of the work vector in the simulation loop, mdlInitializeConditions
, or mdlStart
routines.
Example
Languages
See Also
ssGetNumRWork, ssGetRWork
, ssSetRWorkValue
![]() | ssGetRWork | ssGetSampleTimeOffset | ![]() |