Andrey Rubshtein
Andrey Rubshtein

Reputation: 20915

How can I run the profiler from the command line?

I know that I can use the profiler from the GUI

Desktop-> Profiler

Is there any way to run by a command?

Upvotes: 5

Views: 2541

Answers (2)

alexsmail
alexsmail

Reputation: 5813

You can use the command

profile on

and to stop profiling , you use:

profile off

See documentation for more info.

Upvotes: 5

hurtstotouchfire
hurtstotouchfire

Reputation: 75

The notation is

profile on
%% your functions here
profile off

Many of the arguments for the command "profile" have a hyphen though, just not on and off. See matlab's documentation. You can also use the command:

profile('info')

to get a structure containing your results, if you're working entirely on the command line, and not using the viewer.

Upvotes: 4

Related Questions