Doug's MATLAB Video Tutorials

January 21st, 2009

Breaking up compound statements for the profiler

A statement like this: a = sin(x) + cos(y) + inv(z); makes it impossible to know which part of the calculation is the bottleneck. This video shows how to determine what is slowing your code down, and shows how to fix it.
Download the video here.

4 Responses to “Breaking up compound statements for the profiler”

  1. Lee replied on :

    Hi Doug,

    I saw this video on YouTube:
    http://www.youtube.com/watch?v=CL3COpNZ9BQ

    Can you tell me how one can control the surface plotting shown in the video? I mean, plot the surface gradually instead of the whole surface at once.

    Not sure how I can email you, hence I have to ask you through comments.

    Thanks,
    Lee

  2. dhull replied on :

    Lee,

    That is a cool effect. I am not sure how they did that, though I have some ideas. It is not a built-in effect. I would contact the author directly.

    -Doug

  3. nagaraju a replied on :

    Hi Doug,

    thanks for tut,

    i have one issue using profiling tool,
    if i want profiling the GUI call back functions how i can do that
    thanks once again
    Regards

    Nagaraju A

  4. dhull replied on :

    Nagaraju,

    Very often when I want to see what is going on in a GUI, I will use the command line to turn on the profiler

    >> profiler on
    Do something in gui
    >> profiler off
    >> profiler report

    Enjoy
    Doug

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


MathWorks

Doug Hull is a proud MathWorker who is on a mission to help you with MATLAB.

Doug's picture

These postings are the author's and don't necessarily represent the opinions of The MathWorks.