<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-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>
</body>
</html>