% getdrift.m - click twice to "box" a drifter, and
% get its ID number (list all IDs if several
% drifters passed through the box)

[i,j]=ginput(2);
indg=find(lon>min(i) & lon<max(i) & ...
	lat>min(j) & lat<max(j));
ID=unique(id(indg));
if (length(ID)==1)
	q=find(id==ID);
end;
clear i j indg;

fprintf('Drifter ID: %d\n',ID)