Main Content

getEvidences

Get estimated occupancy and free evidences

Since R2021a

Description

[mOccupy,mFree] = getEvidences(map) returns the occupied evidence mOccupy and free evidence mFree for each grid cells on the dynamic evidential grid map.

example

[mOccupy,mFree] = getEvidences(map,coordinates,'local') returns the occupied evidence mOccupy and free evidence mFree for points specified by the local coordinates.

[mOccupy,mFree] = getEvidences(map,indices,'grid') returns the occupied evidence mOccupy and free evidence mFree for grid cells specified by the cell indices.

Examples

collapse all

Load an evidentialGridMap object from a data file.

load gridMapData.mat
map
map = 
  dynamicEvidentialGridMap with properties:

    NumStateVariables: 4
          MotionModel: 'constant-velocity'
           GridLength: 100
            GridWidth: 100
       GridResolution: 1
    GridOriginInLocal: [-50 -50]

Get estimated occupancy and free evidences for the whole map, specific coordinates, and specific indices.

[mOccupy,mFree] = getEvidences(map)
mOccupy = 100×100

         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
         0         0         0         0         0         0         0         0         0    0.0008         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0         0
      ⋮

mFree = 100×100

    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952    0.9952
      ⋮

[mOccupy,mFree] = getEvidences(map,[10 10;20 20],'local')
mOccupy = 2×1

     0
     0

mFree = 2×1

    0.9952
    0.9952

[mOccupy,mFree] = getEvidences(map,[10 10; 72 8],'grid')
mOccupy = 2×1
10-3 ×

    0.7801
         0

mFree = 2×1

    0.9952
    0.9952

Input Arguments

collapse all

Dynamic evidential grid map, specified as a dynamicEvidentialGridMap object.

Coordinates of local reference frame, specified as an N-by-2 real-valued matrix.

Example: [1 1;2.5 3]

Grid cell indices, specified as an N-by-2 matrix of positive integers.

Example: [1 1;2 3]

Output Arguments

collapse all

Occupied evidence of cells or points in the map, returned as an N-by-M matrix in range [0,1] or an N-by-1 vector in range [0,1].

  • If the input is only the map, mOccupy is returned as an N-by-M matrix, where N is the number of cells in the x-direction of the map and M is the number of cells in the y-direction of the map.

  • If the input contains coordinates, mOccupy is returned as an N-by-1 vector, where N is the number of coordinates specified by the coordinates argument.

  • If the input contains indices, mOccupy is returned as an N-by-1 vector, where N is the number of cells specified by the indices argument.

Free evidence of cells or points in the map, returned as an N-by-M matrix in range [0,1] or an N-by-1 vector in range [0,1].

  • If the input is the map only, mFree is returned as an N-by-M matrix, where N is the number of cells in the x-direction of the map and M is the number of cells in the y-direction of the map.

  • If the input contains coordinates, mFree is returned as an N-by-1 vector, where N is the number of coordinates specified by the coordinates argument.

  • If the input contains indices, mFree is returned as an N-by-1 vector, where N is the number of cells specified by the indices argument.

Version History

Introduced in R2021a