<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>unique</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1999</DATE>
  <SHORT_DESCRIPTION name="unique"> extract unique components of a vector</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[N, [k]]=unique(M)  </CALLING_SEQUENCE_ITEM>
    <CALLING_SEQUENCE_ITEM>  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>M</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: vector of real numbers or strings</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>N</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: vector of real numbers or strings</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>k</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: vector  of integers</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>unique(M)</VERB> returns a vector which retains the unique entries of  <VERB>M</VERB>
    in ascending order.</P>
    <P>
    If required the output argument <VERB>k</VERB> contains the position of the
    first encountered unique entries.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
M=round(2*rand(20,1));

unique(M)
[N,k]=unique(M)

unique(string(M))
[N,k]=unique(string(M))

 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>union</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>sort</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>lex_sort</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
