Main Content

Members of set within tolerance

returns
an array containing logical `LIA`

= ismembertol(`A`

,`B`

,`tol`

)`1`

(`true`

)
where the elements of `A`

are within tolerance of
the elements in `B`

. Otherwise, the array contains
logical `0`

(`false`

). Two values, `u`

and `v`

,
are within tolerance if

`abs(u-v) <= tol*max(abs([A(:);B(:)]))`

That is, `ismembertol`

scales the `tol`

input
based on the magnitude of the data.

`ismembertol`

is similar to `ismember`

.
Whereas `ismember`

performs exact comparisons, `ismembertol`

performs
comparisons using a tolerance.

`[___] = ismembertol(___,`

uses
additional options specified by one or more Name-Value pair arguments
using any of the input or output argument combinations in previous
syntaxes. For example, `Name,Value`

)`ismembertol(A,B,'ByRows',true)`

compares
the rows of `A`

and `B`

and returns
a logical column vector.