Mahalanobis distance between two vectors in MATLAB

2 ビュー (過去 30 日間)
med-sweng
med-sweng 2013 年 12 月 11 日
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 Center および File ExchangeStatistics 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