Development Environment    

An Example Using the Profiler

This example demonstrates how to run the profiler.

  1. To start the profiler, type in the Command Window

    The -detail builtin option instructs the profiler to gather statistics for built-in functions, in addition to the default M-functions, M-subfunctions, and MEX-functions.

    The -history option instructs the profiler to track the exact sequence of entry and exit calls.

  1. Execute an M-file. This example runs the Lotka-Volterra predator-prey population model. For more information about this model, type lotkademo to run a demonstration.
  2. Generate the profile report and save the results to the file lotkaprof.

    This suspends the profiler, displays the profile report in your system's default Web browser, and saves the results. See Viewing Profiler Results for more information.

  1. Restart the profiler, without clearing the existing statistics.

    The profiler is now ready to continue gathering statistics for any more M-files you run. It will add these new statistics to those generated in the previous steps.

  1. Stop the profiler when you are finished gathering statistics.

 The profile Function Viewing Profiler Results