Time to run programming

4 views (last 30 days)
Jerry Walker
Jerry Walker on 21 Oct 2013
Edited: Image Analyst on 21 Oct 2013
Is there a way to insert code to determine the length of time MATLAB takes to process sections of coding? For example the time it takes to run thru a loop.

Answers (3)

Azzi Abdelmalek
Azzi Abdelmalek on 21 Oct 2013
Use
tic
%your code
toc

sixwwwwww
sixwwwwww on 21 Oct 2013

Image Analyst
Image Analyst on 21 Oct 2013
Edited: Image Analyst on 21 Oct 2013
You can use tic and toc
tic;
% code
toc;
or you can use the new timeit() function:
Or you can push the "Run and Time" button on the toolbar.

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!