I have a matrix 10000×2, named A. The first column is x and the second column is y. I am trying to find the number of element where the following condition holds:
where b is a constant. I used FIND command to achieve this. I want to make sure it is correct. Thank you very much.
numel(find((A(:,2)<A(:,1)+b) & (A(:,2)>A(:,1)-b)))
I would appreciate quick responses :))))))