how to calculate the execution time of program?
Mostra commenti meno recenti
When we get desired output in MATLAB.Then how to calculate execution time in MATLAB...
Risposta accettata
Più risposte (4)
Aaron Corbin
il 1 Mar 2014
Modificato: Aaron Corbin
il 1 Mar 2014
1 voto
You could also do the following:
before1=clock code... etime(clock,before1)
It subtracts the time before from the time after.
Laith Mohammed
il 16 Nov 2019
1 voto
First you put tic and entering the code that you are working on it after that toc,
Finaly, create a variable called Elapsed_time = toc
Or, you can just wait and matlab will tell you that elapsed time is (XX seconds)
Steven Lord
il 12 Nov 2021
0 voti
tic and toc is one way to measure the performance of your code. Other ways include the timeit function and the Profiler.
Barsom
il 21 Ott 2024
0 voti
Write a program that reads the departure time of a train and the arrival time and computes and displays the trip time.
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!