Set an element of a block's floating-point work vector
real_T ssSetRWorkValue(SimStruct *S, int_T idx, real_T value)
SimStruct representing an S-Function block.
Index of the element to be set.
New value of element.
real_T value passed into the macro.
idx element of the S-function's floating-point work
value. The vector consists of elements of type
real_T and is of length
Typically, this vector is initialized in
mdlInitializeConditions, updated in
mdlUpdate, and used in
mdlOutputs. You can
use this macro in the simulation loop,
The following statement
ssSetRWorkValue(S, 0, 1.0);
sets the first element of the work vector to