Hello,
Why do I get negative zero as eigenvalue?
ans =
0.2615 0.1950 - 0.3938i
0.1950 + 0.3938i 0.7384
>> eig(ans)
ans =
-0.0000
1.0000
thanks

댓글 수: 2

abhijit kulkarni
abhijit kulkarni 2014년 4월 10일
I think that negative zero implies that it is not treated as positive integer.
Refer: The IEEE 754 standard for floating-point arithmetic (presently used by most computers and programming languages that support floating point numbers) requires both +0 and −0. Real arithmetic with signed zeros can be considered as a variant of the extended real number line such that 1/−0 = −∞ and 1/+0 = +∞; division is only undefined for ±0/±0 and ±∞/±∞.
Negatively signed zero echoes the mathematical analysis concept of approaching 0 from below as a one-sided limit, which may be denoted by x → 0−, x → 0−, or x → ↑0. The notation "−0" may be used informally to denote a small negative number that has been rounded to zero. The concept of negative zero also has some theoretical applications in statistical mechanics and other disciplines.
It is claimed that the inclusion of signed zero in IEEE 754 makes it much easier to achieve numerical accuracy in some critical problems,[1]
Suma
Suma 2014년 4월 10일
Thanks,
Then I have a big problem. I do want high accuracy but then on the other hand it would lead me to an imaginary output further down the line in my work. Is is alright to convert such negative zero value to positive one? How can I convert these negative zero eigenvalue to positive zero in matlab?
Looking forward for suggestion
thanks

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

 채택된 답변

Mischa Kim
Mischa Kim 2014년 4월 10일

0 개 추천

Suma, it's not really zero. Set the display format to long fixed decimal:
format long
[v, d] = eig(a)
v =
0.381333979059441 - 0.770099081813373i 0.226935196532721 - 0.458292719972234i
-0.511401799571426 + 0.000000000000000i 0.859341724458383 + 0.000000000000000i
d =
-0.000011841043894 0
0 0.999911841043894

댓글 수: 5

It's the "exact" solution (within the numerical accuracy, of course).
a*v(:,1) - d(1,1)*v(:,1)
ans =
1.0e-16 *
0.440372429277511 - 0.994365858099713i
0.174869951960650 - 0.277555756156289i
a*v(:,1) % ...with eigenvalue d = 0
ans =
1.0e-05 *
-0.451539238432996 + 0.911877703049791i
0.605553115629043 - 0.000000000002776i
If it makes sense given the number of significant digits of the matrix, that's something you need to decide based on the problem (setup) you are trying to tackle.
Suma
Suma 2014년 4월 10일
if I take the value as it is as negative zero, I obtain a result as 0.83149-5.8003e-16i
i even don't know what it means- there is minus in between 0.83149 and 5.8003 and exp to the power of i. it is small value or large?
also, how do I approximate the precision so that I get zero eigenvalue for case of negative zero? how do i replace?
Mischa Kim
Mischa Kim 2014년 4월 10일
편집: Mischa Kim 2014년 4월 10일
0.83149-5.8003e-16i
is the same as
0.83149 - i*5.8003*10^(-16)
which is essentially equal to 0.83149. What I was trying to point out above is that the exact value of one of the eigenvalues is indeed
-0.000011841043894
however, since the matrix you are computing the eigenvalues for only has 5 significant digits it is questionable if any derived computation result from that matrix with more than 5 significant digits is meaningful in any way. This depends on the (engineering) problem you are trying to analyze.
Suma
Suma 2014년 4월 10일
편집: Suma 2014년 4월 10일
could you elaborate:
e-16i = i*10^(-16)
where does "i" come from?
thank you
Mischa Kim
Mischa Kim 2014년 4월 10일
i is the imaginary unit. Since the matrix is complex you can expect the eigenvectors to be complex as well.

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

추가 답변 (2개)

Suma
Suma 2014년 4월 10일

0 개 추천

Hi,
Could it be that actually it is zero but due to computational approximation required it is showing -0.000011841043894 for example or is it reality?

댓글 수: 1

lvn
lvn 2014년 4월 10일
편집: lvn 2014년 4월 10일
No, Just verified with another program: {0.999912, -0.000011841}

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

Suma
Suma 2014년 4월 10일
편집: Suma 2014년 4월 10일

0 개 추천

if I take the value as it is as negative zero, I obtain a result as 0.83149-5.8003e-16i
i even don't know what it means- there is minus in between 0.83149 and 5.8003 and exp to the power of i. it is small value or large?
also, how do I approximate the precision so that I get zero eigenvalue for case of negative zero? how do i replace?

댓글 수: 3

Suma
Suma 2014년 4월 10일
sorry, how do i do that
Alberto
Alberto 2014년 4월 10일
what you have there is a complex number in the form a+b*i, where a=0.83149 and b=-5.8003e-16 (see the 'i' in the end?). The norm is like a, because b has a very small value (a^2+b^2 ~ a^2)
Suma
Suma 2014년 4월 12일
i accepted an answer but want to thanks all

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

카테고리

도움말 센터File Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

질문:

2014년 4월 10일

댓글:

2014년 4월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by