Reputation: 75
I wanted to ask any keen users here how to "filter out" bad values regarding a tremendous amount of a data matrix in matlab.
e.g: I have a MATLAB data file containing values 2*5000 (double) which represent x and y coordinates. How is it possible to delete all values above or under a certain limit?
or easier:
(matrix from data file)
1 2 4 134 2
3 5 5 4 2
or
1 2 4 9 2
3 5 5 234 2
setting a certain limit and delete column:
1 2 4 2
3 5 5 2
Upvotes: 1
Views: 117
Reputation: 16450
A < 0 | A > 20
~max(A < 0 | A > 20)
A(:, ~max(A < 0 | A > 20))
Upvotes: 2