The following exampls uses the slAccelDemoF14 model to illustrate the use of Simulink® Accelerator™ profiler feature.
To activate the Simulink® Profiler, in the Simulink Editor, on the Debug tab, under Performance Advisor, click Simulink Profiler. You can also issue a set_param command at the MATLAB® command prompt.
modelName = 'slAccelDemoF14'; load_system(modelName) set_param(modelName,'Profile','on');
While the simulation runs, the profiler is collecting data for the report. Once the simulation is complete it creates an HTML report.
open_system(modelName) sim(modelName);

A detailed profiling report is shown in a docked panel on the Simulink Editor. Select a row to see the breakdown of the self-time of the specific model element in the Property Inspector.

You can share the profiling report with others as an HTML report or as a MAT file. To share your profiling run, select the the desired run from the Run menu of the Profiling Report. Then select your desired export format from the Share menu on the Toolstrip.