MATLAB: How to select element of an array between two values

arrayindexing elements

Hi,
I have an array of 2800 elements < 2800 x 1 double >, and I want to create a new array only with the values that are greater than -0.15 and less than 0.15. Many Thanks in advance.
Regards, Martha

Best Answer

A(A > -0.15 & A < 0.15)
or
A(abs(A) < 0.15)