


FIND_POINT - find closest point
find which point of the list (tabx,taby) is
the closest to (poinx,pointy)
Usage:
f=find_point(tabx,taby,pointx,pointy)

0001 function f=find_point(tabx,taby,pointx,pointy) 0002 %FIND_POINT - find closest point 0003 % 0004 % find which point of the list (tabx,taby) is 0005 % the closest to (poinx,pointy) 0006 % 0007 % Usage: 0008 % f=find_point(tabx,taby,pointx,pointy) 0009 0010 distance=sqrt((tabx-pointx).^2+(taby-pointy).^2); 0011 f=find(distance==min(min(distance)));