• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Basic matlab help please

beer

Lifer
<--- 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.
 
Back
Top