MATLAB: How to use ‘find(A == x)’ correctly for nonintegers x

findindicesnoninteger

when i type e.g.: find(A==1.5333) matlab returns an empty matrix, although i can find the value manually.
somebody knows how to use it correctly?

Best Answer

One way:
out = find(abs(A - 1.5333) < tol); % Let here for example: tol = eps(1e4)
or
out = find(ismembertol(A,1.5333,tol));