[Scilab-users] Extract closest value

Lester Anderson arctica1963 at gmail.com
Thu Jun 2 10:17:59 CEST 2022


Hi all,

Is it possible to use one vector to find only those closest values in
another vector with a tolerance limit?

A=[2 3 4 5 6]; // source array
B=[0.25 1.2 2.01 5.2 7.4 9.3 10.6 ]; // target array to find closest values
to A

So in the example above, the closest values would be 2.01 and 5.2 in B, all
other values excluded. Arrays are not going to be the same size! Hopefully
I have explained it well enough.

Thanks
Lester
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20220602/02047ff4/attachment.htm>


More information about the users mailing list