| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
int_T ssSetNumPWork(SimStruct *S, int_T nPWork)
SimStruct representing an S-Function block.
Number of elements to be allocated to the pointer work vector of the block represented by S.
The number of elements specified by nPWork, or -1 if DYNAMICALLY_SIZED.
Use in mdlInitializeSizes to specify the number of pointer (void *) 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 pointer vector are initialized to NULL until values are assigned using ssSetPWorkValue or via the pointer obtained fromssGetPWork.
C, C++
See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_rtwdwork.c used in sfcndemo_sfun_rtwdwork.mdl.
ssGetNumPWork, ssSetPWorkValue, ssGetPWork
![]() | ssSetNumOutputPorts | ssSetNumRunTimeParams | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |