getMahalanobis(X, MU)

Compute squared Mahalanobis distance


Updated 16 May 2017

View License

MD = getMahalanobis(X, MU)

Compute SQUARED Mahalanobis distance between each multivariate observation in the matrix in X from
the "centroid", given by the vector MU. If MU is not included in the call, the function use the mean
vector of the dataset as centroid.


X : Dataset. in the form < Observations x Variables >
MU : Centroid. Vector of P elements in the form <1 x P>


MD : SQUARED Mahalanobis Distance of each observation from the centroid.
Vector of <N x 1> elements.

Cite As

Ruggero G. Bettinardi (2023). getMahalanobis(X, MU) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes