Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

ssGetRWork

Get a block's floating-point work vector

Syntax

real_T *ssGetRWork(SimStruct *S)

Arguments

S

SimStruct representing an S-Function block.

Returns

A pointer (real_T *) to the RWork vector.

Description

Use to access 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 in the simulation loop, mdlInitializeConditions, or mdlStart routines.

Languages

C, C++

Example

See the S-function sfun_dynsize.c used in sfcndemo_sfun_dynsize and the S-function sfunmem.c used in the model sfcndemo_sfunmem.

Introduced before R2006a

Was this topic helpful?