Code running time calculation

i have coded an algorithm in MATLAB, i want to calculate the processing time of that code.
means the time in which input is given and out put is produced. is there any method or process or code that calculate processing time time???

Answers (1)

Mischa Kim
Mischa Kim on 9 Mar 2014
Edited: Mischa Kim on 9 Mar 2014
Alina, use tic at the beginning, and toc at the end of the part of the code you want to measure execution time of. E.g.,
tic
pause(3)
toc

4 Comments

thank you
is thers any similar method to calculate execution time in simulation? thanks...
how then can you assign the value to a variable.
Each time it gives different time!

Sign in to comment.

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Asked:

on 9 Mar 2014

Commented:

on 28 Nov 2019

Community Treasure Hunt

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

Start Hunting!