world2grid

Convert world coordinates to grid indices

Description

ij = world2grid(map,xy) converts an array of world coordinates, xy, to a [rows cols] array of grid indices, ij.

Input Arguments

collapse all

Map representation, specified as a binaryOccupancyMap object.

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

Output Arguments

collapse all

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

Introduced in R2015a