필터 지우기
필터 지우기

Euclidean distance explanation for a matrix

조회 수: 2 (최근 30일)
Damith
Damith 2014년 3월 13일
댓글: Damith 2014년 3월 14일
A B C D
1 0 93.0000 12.0000 9.0000
2 14.0000 102.0000 75.0000 33.0000
3 0 5.0000 34.0000 33.0000
4 11.5000 50.0000 81.0000 36.0000
I have the above matrix. When I preform pdist(<above matric>,'euclidean') for euclidean distance, I got the following answer. Can somebody explain what these euclidean distance means for a (4 x 4) matrix above? I cannot understand how these values are calculated.
69.4406 93.8296 86.4364 106.2356 52.4905 66.1457
Thanks.

채택된 답변

Mischa Kim
Mischa Kim 2014년 3월 14일
편집: Mischa Kim 2014년 3월 14일
Damit, computing the pdist of an m-by-n ( 4-by-4 in your case) matrix means computing the pairwise distance between each of the m rows. For 2 rows you get one result, for 3 rows 3 (1-2, 1-3, 2-3), for 4 rows 6.
  댓글 수: 1
Damith
Damith 2014년 3월 14일
Thank you Mischa,
I need to calculate Euclidean N-correlation distance of the matrix. Do you know how to calculate that in MATLAB? Then I need to find what elements in the matrix are closely related by using the correlation distance estimates.
I assume what you meant here it compares 1st row with 2nd row etc.(1-2, 1-3, 2-3).right?
Thanks again for your reply.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by