Minimum separation distance between the collision objected, returned as an
(*m*+*w*+1)-by-(*m*+*w*+1)
matrix, where *m* is the number of bodies and *w* is
the number of world objects. The final row and column correspond to the robot
base.

The matrix is divided into 3-by-2 sections that represent the
*xyz*-coordinates of witness point pairs in the form:

[*x*_{1}
*x*_{2}
*y*_{1}
*y*_{2}
*z*_{1}
*z*_{2}] | **(4)** |

Each section corresponds to a separation distance in the
`separationDist`

output matrix. Use these equations to determine
where the section of the `witnessPts`

matrix that corresponds to a
specific separation distance begins:

Where
(*S*_{r},*S*_{c})
is the index of a separation distance in the separation distance matrix and
(*W*_{r},*W*_{c})
is the index in the witness point matrix at which the corresponding witness points
begin.

If a pair is in collision, the function returns each coordinate of the witness
points for that element as `NaN`

.

If a pair is in collision, the function returns the separation distance as
`NaN`

.

#### Dependencies

If you specify the `'IgnoreSelfCollision'`

name-value pair
argument as `'on'`

, then the matrix does not contain values for the
distances between any given body and other bodies in the robot model.

**Data Types: **`double`