How to find the efficiency of an algorithm?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have an algorithm fpa1. How can I find its efficiency? All the required files are in the attachment. You can run the main file to run the algorithm. But how to find its efficiency?
0 comentarios
Respuestas (1)
Tushar Behera
el 9 de Feb. de 2023
Hi Sadiq,
I am assuming you want to know how efficient your code is.
You can utilise MATLAB's "profile" built-in function to gauge how effective your code is. The "profile" function creates a report that includes performance data and the amount of time spent in each function. The "tik" and "toc" functions can also be used to calculate how long it takes a chunk of code to run.
For example;
profile on
n = 100;
M = magic(n);
profile viewer
%%%%
tic;
n = 100;
M = magic(n);
toc;
You can read more abut it in the following link:
Regards,
Tushar
1 comentario
Ver también
Categorías
Más información sobre GPU Computing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!