<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 16/10/2019 à 13:19, Stéphane
      Mottelet a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:fed046c1-20b4-2df6-d391-2e6b824a2a29@utc.fr">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Sorry, I thought you were just asking about the tildas, not the
        syntax of unique() in Scilab.</p>
      <p>Please see</p>
      <p><a class="moz-txt-link-freetext"
          href="https://help.scilab.org/docs/6.0.2/en_US/unique.html"
          moz-do-not-send="true">https://help.scilab.org/docs/6.0.2/en_US/unique.html</a></p>
      <p>vs</p>
      <p><a class="moz-txt-link-freetext"
          href="https://fr.mathworks.com/help/matlab/ref/unique.html"
          moz-do-not-send="true">https://fr.mathworks.com/help/matlab/ref/unique.html</a></p>
      <p>Matlab syntax [C,ia,ic] = unique(___)  with 3 outputs has no
        equivalent in Scilab. </p>
    </blockquote>
    <br>
    <p>If this output option is required, this request should be
      urgently reported on Bugzilla.<br>
      Indeed, some new unique() features have been <a
        moz-do-not-send="true"
        href="https://codereview.scilab.org/#/c/20918/">implemented and
        pushed on the Scilab forge for Scilab 6.1.0</a>,<br>
      and are pending, in answer to <br>
      <span style="color: rgb(53, 53, 53); font-family: monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">  </span><a href="http://bugzilla.scilab.org/8418" target="_blank" style="color: rgb(6, 84, 172); text-decoration: none; font-family: monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">http://bugzilla.scilab.org/8418</a><span style="color: rgb(53, 53, 53); font-family: monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">
  </span><a href="http://bugzilla.scilab.org/15522" target="_blank" style="color: rgb(6, 84, 172); text-decoration: none; font-family: monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">http://bugzilla.scilab.org/15522</a><span style="color: rgb(53, 53, 53); font-family: monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">
  </span><a href="http://bugzilla.scilab.org/15795" target="_blank" style="color: rgb(6, 84, 172); text-decoration: none; font-family: monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">http://bugzilla.scilab.org/15795</a><span style="color: rgb(53, 53, 53); font-family: monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">
</span><br class="Apple-interchange-newline">
      Such a request would challenge the third output position.<br>
      To me, the third foreseen output -- that is the vector of numbers
      of occurrences -- would be more useful, and faster to compute, so
      rather to appear before possibly ic in the output list.<br>
      <br>
      Please note that ic should be computed as well in case of "r" or
      "c" option.<br>
    </p>
    <p>Regards<br>
      Samuel<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:fed046c1-20b4-2df6-d391-2e6b824a2a29@utc.fr">
      <p>i.e. in Matlab, after  [C,ia,ic] = unique(A) then A=C(ic), i.e.
        values in ic are the indices of corresponding unique value in
        C.  They can be recovered with the quick and dirty following
        loop:</p>
      <p>for i=1:length(a)<br>
             ia(i)=find(a(i)==C)<br>
        end<br>
      </p>
      <div class="moz-cite-prefix">S.</div>
    </blockquote>
    <br>
  </body>
</html>