Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Mahalanobis distance

`d2 = mahal(Y,X)`

returns the squared Mahalanobis
distance of each observation in `d2`

= mahal(`Y`

,`X`

)`Y`

to the reference
samples in `X`

.