Home > Applications > SpinW > m_files > sw_uniquetol.m

iFit/sw_uniquetol

PURPOSE ^

returns the unique column vectors within tolerance

SYNOPSIS ^

function [unique, firstIdx] = sw_uniquetol(M,tol)

DESCRIPTION ^

 returns the unique column vectors within tolerance

 [unique, firstIdx] = SW_UNIQUETOL(M,tol)

 Two column vectors are considered unequal, if the distance between them
 is larger than the tolerance.

 Input:

 M         Matrix that contains column vectors.
 tol       Distance tolerance, default is 1e-5.

 Output:

 unique    Matrix that contains the unique column vectors.
 firstIdx  Indices pointing to the first occurence of the unique element.

 This function is similar to the Matlab built-in unique(M,'rows','first'),
 but with arbitrary tolerance.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1