Mahalanobis distance between two vectors in MATLAB

2 次查看(过去 30 天)
I have the following two vectors, and trying to find the Mahalanobis distance between them. The two vectors are as follows:
A=[2,4,5,7];
B=[6,3,8,1];
For calculating the Mahalanobis distance, I did the following:
> mahal(A(:),B(:))
For that, I got the following results:
0.6466
0.0259
0.0259
0.6466
But, how can I get one value, as when you calculate Euclidean distance for instance?
Thanks.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by