Main Content

ssGetIWork

Get a block's integer work vector

Syntax

int_T *ssGetIWork(SimStruct *S)

Arguments

S

SimStruct that represents an S-Function block.

Returns

A pointer (int_T *) to the integer work vector for this S-function.

Description

Use to access the integer work vector used by the block represented by S. 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.

Languages

C, C++

Examples

See the S-function stvctf.c used in sfcndemo_stvctf.

Version History

Introduced before R2006a