MATLAB: How to run a simulink model using a program? what is the command used

programmingsimsimuink

Sim command is generally used….I am confused how it is used….how the values produced from the program are transfered to the simulink model.

Best Answer

sim('YourModel');
OR
set_param('YourModel', 'SimulationCommand', 'start');
Using set_param('YourModel', 'SimulationCommand', ...) you can start, stop, pause or continue the simulation.