| Mapping Toolbox | ![]() |
Convert latitude and longitude coordinates to matrix map row and column
Syntax
[row,col] = setpostn(map,maplegend,lat,long) indx = setpostn(map,maplegend,lat,long) [row,col,badindx] = setpostn(map,maplegend,lat,long)
Description
[row,col] = setpostn(map,maplegend,lat,long) returns the row and column indices of the input regular matrix map with a map legend vector of maplegend for the points specified by the vectors lat and long. All angles are in degrees.
indx = setpostn(map,maplegend,lat,long) returns the single-value indices of map(:).
[row,col,badindx] = setpostn(map,maplegend,lat,long) also returns the indices of lat and long corresponding to points outside of map. These points are always ignored in row and col.
Examples
What are the matrix coordinates in topo of Denver, Colorado, at (39.7ºN,105ºW)?
See Also
ltln2val |
Latitude and longitude to matrix entry value |
setltln |
Row and column to latitude and longitude |
| setm | shaderel | ![]() |