Documentation Center

  • Trials
  • Product Updates

Introduction to Profiling Models

The following example, with the slAccelDemoF14 model, illustrates the the use of Simulink® Accelerator™ profiler feature.

Activating the Profiler

Simulink® Profiler can be activated by selecting Profiler from the Simulink Analysis menu or by issuing a set_param command at the MATLAB® command prompt.

modelName = 'slAccelDemoF14';

Creating a Temporary Working Directory

The profiler writes HTML-files out to the current directory, so first change to a temporary directory.

temp = tempname;
originalDir = pwd;

Running the Simulation

While the simulation runs, the profiler is collecting data for the report. Once the simulation is complete it creates an HTML report.


Viewing the Report

The generated report consists of two HTML-files: a detail file and a summary file. Simulink stores the summary and detail files in MATLAB's working directory and displays the summary file in the MATLAB help viewer when the simulation ends. Hyperlinks in the summary enable you to review the detailed timing information for each function.

Cleaning Up

Close the model and remove the generated files.

Was this topic helpful?