Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Closest values with 2 vectors

$
0
0
I have 2 matrices, lets say A=[1 5 7 9 13 15 19 24 27] and B=[2 6 10 13 17 18 20 25].
I want to find out the values / position in A which are same or nearest to every value of B.

P.S: The result should have same array length as vector B.

Thanks.


Joe

Viewing all articles
Browse latest Browse all 19628

Trending Articles