Sorry, instead of my previous message, please read
--> [A,B] = ndgrid(rand(1,1000), rand(1,10000)); // test's data
--> size(A)
ans =
1000. 10000.
--> [v, i] = min(abs(A-B), *"c"*);
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190215/33f19701/attachment.htm>