Main Content


Convert grid indices to world coordinates


xy = grid2world(map,ij) converts a [row col] array of grid indices, ij, to an array of world coordinates, xy.

Input Arguments

collapse all

Map representation, specified as a occupancyMap, mapLayer, or multiLayerMap object.

Grid positions, specified as an n-by-2 matrix of [i j] pairs in [rows cols] format, where n is the number of grid positions. The grid cell locations are counted from the top left corner of the grid.

Data Types: double

Output Arguments

collapse all

World coordinates, returned as an n-by-2 matrix of [x y] pairs, where n is the number of world coordinates.

Data Types: double

Version History

Introduced in R2019b