Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
profiler tool with GUI file

Subject: profiler tool with GUI file

From: Dave Brackett

Date: 6 Oct, 2008 16:24:03

Message: 1 of 4

Hi,

I have a GUI which controls an m file. After some user interaction to change settings, the function runs for some time. I want to profile the code to identify areas for improvement, but when i use the profiler tool to run the m file with the GUI, it starts profiling but stops almost immediately once the GUI loads.

How can I use the profiler tool to assess the m file which has the GUI?

Thanks.

Subject: profiler tool with GUI file

From: Malcolm Lidierth

Date: 6 Oct, 2008 17:22:03

Message: 2 of 4

Does the profiler stop or does your code stop because of a uiwait() in the GUI code?

If its the code, fill in the GUI and click OK (or whatever label you have). That should issue a uiresume() and start execution again.
 

Subject: profiler tool with GUI file

From: matt dash

Date: 6 Oct, 2008 18:22:02

Message: 3 of 4

For profiling guis I find it works best to set up the gui, type "profile on" in the command window, let the gui do whatever you want to profile, and then type "profile viewer" in the command window.

Subject: profiler tool with GUI file

From: Dave Brackett

Date: 9 Oct, 2008 19:49:01

Message: 4 of 4

"matt dash" <n.a@mail.com> wrote in message <gcdl0a$c3f$1@fred.mathworks.com>...
> For profiling guis I find it works best to set up the gui, type "profile on" in the command window, let the gui do whatever you want to profile, and then type "profile viewer" in the command window.
>
>

thanks for this tip matt, I didn't know you could access the profile tool in that way.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us