Main Content

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 abinaryOccupancyMapobject.

World coordinates, specified as ann-by-2 vertical array of[x y]pairs, wherenis the number of world coordinates.

Output Arguments

collapse all

网格索引指定为ann-by-2 vertical array of[i j]pairs in[rows cols]format, wherenis the number of grid positions.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2015a