Euclidean distance between two vectors of complex numbers

I have two vectors of complex numbers and want to compute Euclidean distance between them. whether I should use d = norm(A - B) or d = norm(abs(A) - abs(B))

 채택된 답변

Matt J
Matt J 2014년 1월 8일
편집: Matt J 2014년 1월 8일
Suppose you have
>> A=1-i; B=1+i;
Which result do you consider correct,
>> d = norm(A - B) ,
d =
2
or
>> d = norm(abs(A) - abs(B))
d =
0

댓글 수: 5

shouldn't it be 0?
Friedrich
Friedrich 2014년 1월 8일
편집: Friedrich 2014년 1월 8일
Take a piece of paper and a pen, draw a coordinate system and mark the points A and B in there. What do you think is the distance?
See that way it is 2. Right. But actually I am calculating the feature vectors that are coming as complex numbers. So, if there are 2 similar objects , then the difference between feature vectors (complex numbers in my case) should give 0 and not 2. as the - sign in the conjugate would be because of the rotation. Isn't it so?
Matt J
Matt J 2014년 1월 8일
편집: Matt J 2014년 1월 8일
What about when A=1, B=-1. Do you again want to consider their distance to be zero?
In any case, this is not a general question that anyone but you can know the answer to. This is driven by the needs of your specific application and so only you know what is right for that.
Considering you are working on feature vectors which give complex numbers then you should consider euclidean distance

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

질문:

2014년 1월 8일

댓글:

2017년 5월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by