MATLAB: How to find cell positions of values within specific interquartile range from a column vector

cell positionquantiles

I have one year daily rainfall values in A. I extracted values of interest (B) from A within quantiles .85 to .99 using following:
V = quantile(A,[0.85 .99])
B = A(A>V(1) & A<V(2))
How to find corresponding cell positions of these values in A?

Best Answer

idx = find(A>V(1) & A<V(2)) ;