<--- really really hates matlab now
if img is a 512x512 matrix, and I want any element above 128 to go to 255 and anything below to go to 0, then why doesn't
if (img > 128)
img = 255;
else img = 0;
end;
work? Isn't the whole point of these vectorized operations to allow you to specify matricies and implicitly loop through them? My directions specifically say you cannot use any looping mechanisms at all.
if img is a 512x512 matrix, and I want any element above 128 to go to 255 and anything below to go to 0, then why doesn't
if (img > 128)
img = 255;
else img = 0;
end;
work? Isn't the whole point of these vectorized operations to allow you to specify matricies and implicitly loop through them? My directions specifically say you cannot use any looping mechanisms at all.