<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello<span style="color:rgb(0,0,0)">
        Philipp, and to all (former ;-) matlabers,</span></div>
    <div class="moz-cite-prefix"><span style="color:rgb(0,0,0)"><br>
      </span></div>
    <div class="moz-cite-prefix"><span style="color:rgb(0,0,0)"></span>Le
      16/10/2019 à 11:46, P M a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACf7ODujLr-wufzBHkmar+y-3g6GKD6nZVDsSSRgdTH68xLaDw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Dear experts,</div>
        <div><br>
        </div>
        <div>trying to convert a matlab code to scilab I come across
          following line:</div>
        <div>
          <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(74,85,219)">[~</span><span style="color:rgb(0,0,0)">,~</span><span style="color:rgb(0,0,0)"></span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,0)">Minstances_hat</span><span style="color:rgb(74,85,219)">]</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(0,0,0)">unique</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">B</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(255,170,0)">:</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;
</span></pre>
          <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">How to replace the "~" symbol?
</span></pre>
          <pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">B is the blue channel of a RGB image...hence a m x n matrix of integers (type(B) = 8 )
</span></pre>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>This issue is now reported as <a moz-do-not-send="true"
        href="http://bugzilla.scilab.org/show_bug.cgi?id=16254">bug
        16250</a>.</p>
    <p>Solving this issue would improve the converter.<br>
      I may contribute to solve it. However, I do not use to use Matlab
      or Octave. So i don't know how the ~ placeholder set in the list
      of <i>inputs</i> is processed inside the called function. This
      message is a call for information about this topic.<br>
      <br>
      Ignoring an output is trivial. As suggested by Stéphane, the ans
      variable is a good candidate as replacement for ~,<br>
      just as a fake recipient, as in "[~, ia] = unique(A)"   => 
      "[ans, ia] = unique(A)"<br>
    </p>
    <p>The meaning of ignoring an input is a priori completely
      different, at least from a Scilab point of view.<br>
    </p>
    <p>This leads to the fact that, on the "function ..." line, the
      converter will have to distinguish the list of inputs from the
      list of outputs, and then process the same ~ character in 2
      different ways.<br>
      This processing would have to run also when the "function ..."
      line is split on several rows with the "..." continuation marks.<br>
      <br>
      First, i will need an actual example of function call with ~ in
      the input list, runnable in Octave.<br>
      Any compact suggestion is welcome.<br>
      At least 2 use cases are expected: one calling a function written
      in Octave/Matlab language (improperly called "macros" in Scilab),
      the other one calling a hard-coded function.<br>
    </p>
    <p>Let's consider the first case, with a "macro":</p>
    <ul>
      <li>What does  the ~ sent placeholder pass to the function? How is
        it detected/detectable inside the macro ?</li>
      <li>How is it processed by the function? Is there a generic
        default processing, as replacing it with the empty matrix [], or
        whatever else?</li>
    </ul>
    <p>Hope reading your contributions,</p>
    <p>Regards<br>
      Samuel</p>
  </body>
</html>