MATLAB: How can I measure the real time taken by a simulation in case i use a simulink model

simulationsimulinktime

how can I measure the time taken by a simulation in case i use a simulink model? (as using tic,toc in .m files )
any comments/answers in this regard is greatly appreciated

Best Answer

You still use tic-toc and run the simulation from MATLAB:
>> tic; sim(bdroot); toc
Or, use the Simulink Profiler. Turn it on by selecting Tools>Profile in your model. The next time you run your model, and HTML report is automatically generated and opened at the end of simulation. The "Total recorded time" (or the row corresponding to "sim") is the total time taken for simulation.