Changeset 12650


Ignore:
Timestamp:
07/18/12 10:29:27 (13 years ago)
Author:
Mathieu Morlighem
Message:

return only the first occurence

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/utils/Geometry/find_point.m

    r1 r12650  
    88%      f=find_point(tabx,taby,pointx,pointy)
    99
     10%Compute distance between point and cloud of points
    1011distance=sqrt((tabx-pointx).^2+(taby-pointy).^2);
    11 f=find(distance==min(min(distance)));
     12
     13%find index of the minimum distance and return the first one only
     14f=find(distance==min(min(distance)),1);
Note: See TracChangeset for help on using the changeset viewer.