How can I accelerate my Matlab program
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everybody, the working of the my matlab program durate very long, and i want to short the operation time. I write the outline of the my program below.
f=(400:1000);
q=5;
m=5;
rk=4096;
f1=length(f);
for a=1:f1
for b=1:q
for c=1:m
for d=1:rk
end
end
end
end
Also, how can be shorted the operation time of the any matlab program?
2 comentarios
Voss
el 14 de Mayo de 2022
Here's an outline of a solution:
f=(400:1000);
q=5;
m=5;
rk=4096;
f1=length(f);
% use vectorized operations instead of for loops
It's possible that the operations inside the for loops can be vectorized, which will very likely speed up the program. However, without knowing what those operations are, it's not possible to say the extent to which vectorization is possible or how to do it. Please share the full code.
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!