Nathan Fellman
Nathan Fellman

Reputation: 127428

How can I measure how long a function runs in Matlab?

I have a Matlab program that is running longer than I'd like it to. Is there built-in way to profile Matlab, similar to how time works in unix?

Upvotes: 4

Views: 1276

Answers (1)

Jonas
Jonas

Reputation: 74930

There are three ways:

The profiler allows you to see how much time each line takes, and thus, it is the best way to find bottlenecks.

Upvotes: 5

Related Questions