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.
applyToModel
| loadVariablesFromMATFile
| parsim
| setBlockParameter
| setExternalInput
| setInitialState
| setModelParameter
| setPostSimFcn
| setVariable
| Simulation
Manager
| Simulink.SimulationInput
| validate