Main Content

Set occupancy value of locations

`setOccupancy(`

assigns occupancy values, `map`

,`xy`

,`occval`

)`occval`

, to the input array of
world coordinates, `xy`

in the occupancy grid,
`map`

. Each row of the array, `xy`

, is
a point in the world and is represented as an `[x y]`

coordinate pair. `occval`

is either a scalar or a single
column array of the same length as `xy`

. An occupied
location is represented as `true`

(`1`

), and a
free location is represented as `false`

(`0`

).

outputs an `validPts`

= setOccupancy(___)`n`

-element vector of logical values indicating
whether input coordinates are within the map limits.

`setOccupancy(`

assigns a matrix of occupancy values by specifying the bottom-left corner
location in world coordinates.`map`

,`bottomLeft`

,`inputMatrix`

)

`setOccupancy(`

assigns a matrix of occupancy values by specifying the bottom-left corner
location in local coordinates.`map`

,`bottomLeft`

,`inputMatrix`

,"local")

`setOccupancy(`

assigns a matrix of occupancy values by specifying the top-left cell index in
grid indices and the matrix size.`map`

,`topLeft`

,`inputMatrix`

,"grid")

`binaryOccupancyMap`

| `getOccupancy`

| `occupancyMap`

(Navigation Toolbox)