Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

ssSetNumRWork - Specify the size of a block's floating-point work vector

Syntax

int_T ssSetNumRWork(SimStruct *S, int_T nRWork)

Arguments

S

SimStruct representing an S-Function block.

nRWork

Number of elements in the floating-point work vector.

Returns

The number of elements specified by nRWork, or -1 if DYNAMICALLY_SIZED.

Description

Use in mdlInitializeSizes to specify the number of real_T work vector elements as 0, a positive integer, or DYNAMICALLY_SIZED. If you specify DYNAMICALLY_SIZED, you can specify the true (positive integer) width in mdlSetWorkWidths; otherwise, the width used is the width of the signal passing through the block. The elements of the RWork vector are initialized to zero.

Languages

C, C++

Example

See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_dynsize.c used in sfcndemo_sfun_dynsize.mdl and the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfunmem.c used in sfcndemo_sfunmem.mdl.

See Also

ssSetNumIWork, ssSetNumPWork

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS