Hello,
I have big matrixes of same size, and am suing for loop with if statement, which is bottleneck in my code and is very slow. How would it be possible to optimize it?
for i=1:n1 for j=1:n2 if id(i,j)==1 if RR(i,j)==1 id(i,x(i,j))=0; end end endend Maybe it is possible to vectorize or use bsxfun?
Best Answer