how can i determine the time it took to run an input?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
n = length(V);
S = zeros(n,2*n);
for i = 1:n
for j = 2:i
for k = 1:n
S(i,j+k) = V(i);
end
end
end
First determine the number of instructions as a function of n, thus find T(n) for a single execution
of this algorithm?
2 Kommentare
madhan ravi
am 10 Apr. 2019
have you seen tic toc ? if you want to know the running time of a script.
Antworten (1)
Siehe auch
Kategorien
Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!