Syntax
[p,x,D,pn]=nearestpair(PLA,PLB,[tp]);
Input Parameter
PLA : | | Vector list A |
PLB : | | Vector list B |
tp : | | 'min', 'mean' ; default is 'min' |
Output Parameter
p : | | [Ai Bi] index list for the exclusive pairs |
x : | | Distance between the pairs |
D : | | Full Distance matrix |
pn : | | [Ai Bi] index list for the unpaired points |
Examples
D1=rand(10,2); D2=rand(10,2);
nearestpair(D1,D2,'mean');
nearestpair(D1,D2,'min');
D1=rand(10,2); D2=rand(5,2);
nearestpair(D1,D2,'min')
nearestpair(D2,D1,'min')
Copyright 2017-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Last html export of this page out of FM database by TL: 2025-09-21