Main Content

grid2local

Convert grid indices to local coordinates

Description

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

Input Arguments

collapse all

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

Grid positions, specified as an n-by-2 vertical array of [i j] pairs in [rows cols] format, where n is the number of grid positions.

Output Arguments

collapse all

Local coordinates, specified as an n-by-2 vertical array of [x y] pairs, where n is the number of local coordinates.

Introduced in R2019b