Home > hfrc > matlab > @HFRC > ginput.m



GINPUT - find indices of points of interest.


function [I, lon, lat, d] = ginput(h, n)


 GINPUT - find indices of points of interest.

 This function is like the usual ginput in that it looks for a certain
 number of points on a graph, with the exception that it assumes that
 the points are on a basemap and instead of returning the real
 coordinates of the point selected, it returns the indice and perhaps
 the coordinates of the nearest grid point to the point selected.

 Usage: [ indice, lon, lat, dist ] = ginput( hfrc_obj, n_pts )
        [ indice, x_kms, y_kms, dist ] = ginput( hfrc_obj, n_pts )

 If n_pts is left off, an unlimited number of points will be read until
 return is pressed.

 If the units of the grid is lon,lat, then it is assumed the input points
 will be as well.  If the units of the grid are anything else, then it is
 assumed that the grid is in Kms (or any coordinates with equal x and y
 scales), as are the input points.

 This function breaks down if the hfrc_obj has two grid points and the
 number of points selected has two grid points.


     $Id: ginput.m,v 1.3 2004-09-08 03:31:13 dmk Exp $    

 Copyright (C) 2001 David M. Kaplan
 Licence: GPL



This function calls: This function is called by:
Generated on Mon 18-Dec-2006 07:26:46 by m2html © 2003