I have this for loop with conditionals inside it.
for i=1:m for j=1:n if (flipped_im(i,j,1)>flipped_im(i,j,2)) || (flipped_im(i,j,1)>flipped_im(i,j,3)) mod_im(i,j,:)=255; else mod_im(i,j,:)=flipped_im(i,j,:); end endend
How I can turn this loop into vectorized code?
Best Answer