This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Latitudes and longitudes of mouse-click locations


[lat, lon] = inputm
[lat, lon] = inputm(n)
[lat, lon] = inputm(n,h)
[lat, lon, button] = inputm(n)
MAT = imputm(...)


[lat, lon] = inputm returns the latitudes and longitudes in geographic coordinates of points selected by mouse clicks on a displayed grid. The point selection continues until the return key is pressed.

[lat, lon] = inputm(n) returns n points specified by mouse clicks.

[lat, lon] = inputm(n,h) prompts for points from the map axes specified by the handle h. If omitted, the current axes (gca) is assumed.

[lat, lon, button] = inputm(n) returns a third result, button, that contains a vector of integers specifying which mouse button was used (1,2,3 from left) or ASCII numbers if a key on the keyboard was used.

MAT = imputm(...) returns a single matrix, where MAT = [lat lon].


inputm works much like the standard MATLAB® ginput, except that the returned values are latitudes and longitudes extracted from the projection, rather than axes x-y coordinates. If you click outside of the projection bounds (beyond the map frame in the corners of a Robinson projection, for example), no coordinates are returned for that location.

inputm cannot be used with a 3-D display, including those created using globe.

See Also


Introduced before R2006a