% Example from lab of using logical indexing
A = [1 2 3 4;
2 7 8 9]
A>2
A(A>2) = 0