Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Finding Euclidean Distance

조회 수: 1 (최근 30일)
kash
kash 2012년 6월 21일
마감: MATLAB Answer Bot 2021년 8월 20일
I have a matrix
A = [2 4 5 7 8 ; ...
5 2 3 1 0 ; ...
8 9 1 0 3 ; ...
7 2 3 7];
i have another matrix
D = [7
1
o
3];
plz tell how to find the euclidean distance
  댓글 수: 2
Jan
Jan 2012년 6월 21일
Dear kash, I've formatted your code to improve the readability. Then it gets obvious, that 1. "A" is not a matrix, because the last line contains 4 elements only, and that 2. "D" contains the character 'o'. Should this be the number zero?
Finally the Euclidean distance is defined between vectors only. Do you want the average distance between the vector D and the column vectors of A, or the vector of distances, or the min or max of them?
kash
kash 2012년 6월 21일
Sorry jan some mistake in that matrix
A = [2 4 5 7 8 ; ...
5 2 3 1 10 ; ...
8 9 1 10 3 ; ...
7 2 3 7 1];

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by