How Can i speed up "for" loop ?
Show older comments
Hi all,
I have the following code:
for i=1:1:length(y)
for j=1:1:length(x)
if ((X(i,j))^2)/(R_ell^2) + ((Y(i,j))^2)/(r_ell^2) < 1.0
Z(i,j)=0.0;
end
end
end
It takes a lot of time. Can someone help me t speed up these loops?
Thank you
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!