User`s guide

3 Writing S-Functions As C-MEX files
3-26
mdlProcessParameters
mdlProcessParameters is an optiona l routine that Simulink calls after
mdlCheckParameters changes and verifies parameters. The processing is done
at the top of the simulation loop when it i s safe to process t he change d
parameters. This routine can only be used in a C MEX S-function.
The p urpose of this routine is to process newly changed parameters. An
example is to cache parameter changes in work vectors. Simulink does not call
thisroutine when itis used withtheReal-TimeWorkshop. Therefore, ifyouuse
this routine in an S-function designed for use with the Real-Time Workshop,
youmustwrite yourS-functionsothat it doesn’trelyonthis routine.Todo this,
you must inline your S-function by using t he Target Language Compiler. S ee
The Target Language Compiler Reference Guide for information on inlining
S-functions.
The synopsis is:
#define MDL_PROCESS_PARAMETERS /* Change to #undef to remove function */
#if defined(MDL_PROCESS_PARAMETERS) && defined(MATLAB_MEX_FILE)
static void mdlProcessParameters(SimStruct *S)
{
}
#endif /* MDL_PROCESS_PARAMETERS */