I have a large matrix with 96 columns and thousands of rows. I would like to find all values values larger than 100 in even-numbered columns (2, 4, 6…) and replace them with NaN.
I know of:
A(A(:,2)>100,2) = NaN;
How can I make it work with multiple columns (:,2:2:end)?
Best Answer