Specify a MATLAB function to run before start of
each simulation through SimulationInput
object,
in
in = in.setPreSimFcn(@(
runs before each simulation starts. The x
) myfunction(arg1, arg2 ...
))Simulink.SimulationInput
object is passed as an argument
x
to this function. myfunction
is any
MATLAB® function and can be used to modify the Simulink.SimulationInput
object. If you use
myfunction
to modify the Simulink.SimulationInput
object, you must return Simulink.SimulationInput
object as the only output argument.
Simulation
Manager
| Simulink.SimulationInput
| applyToModel
| loadVariablesFromMATFile
| parsim
| setBlockParameter
| setExternalInput
| setInitialState
| setModelParameter
| setPostSimFcn
| setVariable
| validate