Home > freetb4matlab > set > unique.m

unique

PURPOSE ^

% Return the unique elements of @var{x}, sorted in ascending order.

SYNOPSIS ^

function [y, i, j] = unique (x, varargin)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} unique (@var{x})
% @deftypefnx {Function File} {} unique (@var{x}, 'rows')
% @deftypefnx {Function File} {} unique (@dots{}, 'first')
% @deftypefnx {Function File} {} unique (@dots{}, 'last')
% @deftypefnx {Function File} {[@var{y}, @var{i}, @var{j}] =} unique (@dots{})
% Return the unique elements of @var{x}, sorted in ascending order.
% If @var{x} is a row vector, return a row vector, but if @var{x}
% is a column vector or a matrix return a column vector.
%
% If the optional argument @code{'rows'} is supplied, return the unique
% rows of @var{x}, sorted in ascending order.
%
% If requested, return index vectors @var{i} and @var{j} such that
% @code{x(i)==y} and @code{y(j)==x}.
%
% Additionally, one of @code{'first'} or @code{'last'} may be given as
% an argument.  If @code{'last'} is specified, return the highest
% possible indices in @var{i}, otherwise, if @code{'first'} is
% specified, return the lowest.  The default is @code{'last'}.
% @seealso{union, intersect, setdiff, setxor, ismember}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003