MATLAB vectorize nested for loop
Hi I am struggling with matlab vactorization any help on this would be great thanks.
oldLocation
, Limit_
are both matrices
for i=1:250
for j=1:350
开发者_如何学编程 temp= oldLocation(i,j,:)./Limit_(i,j,:);
end
end
Just perform the division directly. Of course, you'll need to adapt the code that follows (unless you keep overwriting temp
)
temp = oldLocation./Limit_;
精彩评论