Download What Is an S

Transcript
mdlStart
Purpose
Initialize the state vectors of this S-function
Required
No
C Syntax
void mdlStart(SimStruct *S)
C
Arguments
S
M Syntax
Start(s)
M
Arguments
s
Description
Simulink invokes this optional method at the beginning of a simulation.
It should initialize the continuous and discrete states, if any, of this
S-Function block. Use ssGetContStates and/or ssGetDiscStates to
get the states. This method can also perform any other initialization
activities that this S-function requires, such as allocating memory or
setting up user data.
Languages
Ada, C, M
Example
See matlabroot/simulink/src/sfun_directlook.c for an example of
how to use this function.
See Also
mdlInitializeConditions, ssGetContStates, ssGetDiscStates
SimStruct representing an S-Function block.
Instance of Simulink.MSFcnRunTimeBlock class representing the
S-Function block.
8-61