Get a pointer from a block's pointer work vector
void *ssGetPWorkValue(SimStruct *S, int_T idx)
SimStruct that represents an S-Function block.
Index of the pointer returned by this function.
void *) element of the PWork vector at the index
Use to access an element of the pointer work vector used by the block represented
S. The vector consists of elements of type
* and is of length
this vector is initialized in
mdlInitializeConditions, updated in
mdlUpdate, and used in
mdlOutputs. You can
use this macro in the simulation loop,
mdlStart routines. A return value of
indicates that no value was assigned into the
idx element of the
pointer work vector.
The following statement
void* v = ssGetPWorkValue(S, 0);
is equivalent to
void** wv = ssGetPWork(S); void* v = wv;
Introduced before R2006a