FUNCTION REFERENCE

uniquetol

Find sorted unique values within a scaled tolerance.

Find sorted unique values within a scaled tolerance.

Syntax

[C, ia, ic] = uniquetol(A[, tol][, 'ByRows', true][, 'DataScale', scale])

Real double and single inputs are accepted. The default tolerance is 1e-12 for double and 1e-6 for single. Values match when their absolute difference is within tol times the largest absolute input value; ByRows uses a separate scale for each column. DataScale overrides it. NaNs remain distinct. OutputAllIndices returns a cell of matching input indices instead of ia.

Example

uniquetol([1 1.01 2], 0.01)   % [1 2]

Differences from MATLAB: N-D input is not supported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.