setPreSimFcn
Specify aMATLABfunction to run before start of each simulation throughSimulationInput
object, in
Description
in = in.setPreSimFcn(@(
runs before each simulation starts. Thex
) myfunction(arg1, arg2 ...
))Simulink.SimulationInput
object is passed as an argumentx
to this function.myfunction
is any MATLAB®function and can be used to modify theSimulink.SimulationInput
object. If you usemyfunction
to modify theSimulink.SimulationInput
object, you must returnSimulink.SimulationInput
object as the only output argument.
Input Arguments
See Also
Simulink.SimulationInput
|parsim
|applyToModel
|setBlockParameter
|setModelParameter
|setInitialState
|setExternalInput
|setVariable
|validate
|setPostSimFcn
|loadVariablesFromMATFile
|Simulation Manager
Introduced in R2017a