<div dir="ltr"><div dir="ltr"><div>Ok, thanks for your help..<br><br></div><div>Actually the sizes I gave where just for demonstation.<br><br></div><div>If I use the real array sizes, I get a message: can not allocate  7469.60MB memory...which maybe is true.<br></div><div>available RAM after starting Scilab is 3701 MB<br><br></div><div>actual array sizes:<br><br>A has 1076 elements<br></div><div>B has 1'350'000 elements, with a lot of Nan's in it<br><br></div><div>if I use thrownan(B) I can reduce the array size of B to 867751 elements but still get the Message above.<br><br></div><div>(without thrownan() the memory scilab wants to allocate is even bigger)<br></div><div><br><br><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Fr., 15. Feb. 2019 um 23:25 Uhr schrieb Samuel Gougeon <<a href="mailto:sgougeon@free.fr">sgougeon@free.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">
    <div class="gmail-m_3771141033949040913moz-cite-prefix">... and even clearer, with respect to
      your own notations:<br>
      <br>
      <font size="-1"><tt>--> A = </tt></font><font size="-1"><tt><font size="-1"><tt>rand(1,1000);</tt></font></tt></font><font size="-1"><tt>  // test's data</tt></font><font size="-1"><tt><font size="-1"><tt> <br>
              --> B = rand(1,10000);</tt></font><br>
          --> [a, b] = ndgrid(A, B);</tt><tt><br>
        </tt><tt>--> size(a)</tt><tt>  // same for b<br>
        </tt><tt> ans  =</tt><tt><br>
        </tt><tt>   1000.   10000.</tt><tt><br>
        </tt><tt>--> [v, i] = min(abs(a-b), </tt></font><tt><b>"c"</b></tt><font size="-1"><tt>);</tt></font><br>
    </div>
    <br>
  </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>