Writing S-Functions    
ssGetPWorkValue

Get a pointer from a block's pointer work vector.

Syntax

Arguments

S
   SimStruct representing an S-function block.

idx
   Index of the pointer returned by this function

Description

Returns the idx element of the the pointer work vector used by the block represented by S. The vector consists of elements of type void * and is of length ssGetNumPWork(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.

Example

The following statement

is equivlent to

Languages

C

See Also
ssGetNumPWork, ssGetPWork, ssSetPWorkValue


  ssGetPWork ssGetRealDiscStates