<div dir="ltr">
<div><span style="color:rgb(74,85,219)">[ans</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,0)"></span><span style="color:rgb(0,0,0)">ans,</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> <br></div><div>gives: Wrong number of output arguments.</div>
<div><br></div><div>I also tried :</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)">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><span style="color:rgb(74,85,219)"></span></div><div>and get a vector.</div><div>also <br></div><div><span style="color:rgb(74,85,219)"></span><span style="color:rgb(74,85,219)"></span>
</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)">Minstances_hat</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,0)">index</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><span style="color:rgb(74,85,219)"></span></div><div><span style="color:rgb(0,0,0)">seem to work.<br></span>
</div><div><br></div><div><br></div><div>However afterwards there is this line: <br><pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(92,92,92)">masks =</span> reshape<span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">Minstances_hat</span><span style="color:rgb(92,92,92)">-</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(50,185,185)">size</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(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span></pre></div><div>I try to convert via: <br></div><div></div><div><pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">mask</span> <span style="color:rgb(92,92,92)">=</span> <span style="color:rgb(50,185,185)">matrix</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(0,0,0)">Minstances_hat</span><span style="color:rgb(92,92,92)">-</span><span style="color:rgb(188,143,143)">1</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(50,185,185)">size</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(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span></pre></div><div>but no success.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mi., 16. Okt. 2019 um 11:50 Uhr schrieb Stéphane Mottelet <<a href="mailto:stephane.mottelet@utc.fr">stephane.mottelet@utc.fr</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hello<br>
</p>
<div>Le 16/10/2019 à 11:46, P M a écrit :<br>
</div>
<blockquote type="cite">
<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>
</div>
</div>
</blockquote>
<p>by dummy names, e.g.</p>
<pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(74,85,219)">[ans</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,0)"></span><span style="color:rgb(0,0,0)">ans,</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><span style="color:rgb(0,0,0)">;
There is no equivalent mechanism in Scilab.
</span></pre></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
<blockquote type="cite">
<div dir="ltr">
<div>
<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>
<pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">
Thank you,
</span></pre>
<pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(0,0,0)">Philipp
</span></pre>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
users mailing list
<a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a>
<a href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" target="_blank">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre cols="72">--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a href="http://www.utc.fr/~mottelet" target="_blank">http://www.utc.fr/~mottelet</a>
</pre>
</div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote></div></div>