Simple Question about Optimization of Nested FOR loops
1 view (last 30 days)
Show older comments
How can I optimize the following code in order to avoid the FOR loops so that it runs faster?
Andrei Bobrov on 14 Jun 2013
B = zeros(X,Y,Y);
B(:,1,:) = permute(C.*(A == 1),[1,3,2]);
B = B(:);
Find more on Loops and Conditional Statements 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!