Eigenvalue Accuracy in Matlab
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Eigenvalue Accuracy in Matlab
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
Mr Hrundi V Bakshi
Guest





Posted: Tue Dec 13, 2005 9:15 am    Post subject: Re: Eigenvalue Accuracy in Matlab Reply with quote

"Cleve Moler" <moler@mathworks.com> wrote in message
news:dnl992$c7v$1@fred.mathworks.com...
Quote:
I am afraid that Don has fallen victim to a widely believed
misconception.
The condition number of a matrix has nothing to do with the sensitivity
or
computed accuracy of its eigenvalues.

There are numerous matrix condition numbers, which one do you mean?,
obviously wrt to inversion which is not necessarily the object of interest.

Quote:
The condition number of a matrix
measures nearness to singularity. A matrix is singular if and only if it
has an eigenvalue equal to zero. The condition number of the matrix of
eigenvectors is the crucial quantity. If a matrix fails to have a full
set of linearly independent eigenvectors, then its eigenvalues are
sensitive
to perturbations, including roundoff error. Such matrices are called
"defective".

This particular example happens to be both singular and defective. If
any scalar value is added to the diagonal elements, then the matrix is no
longer singular, but that scalar value becomes the sensitive eigenvalue.


The particular A could represent the interaction of three species such that
they while dynamically fluid, they're ultimately matastable, as occurs
naturally in many chemically reactive systems. In these cases the condition
number of interest is not wrt inversion and such irrelevant suspects as
singularity, defectiveness, et cetra, et cetra, et cetra, but rather the
exponentiation of A (scaled as warranted) which Matlab does next to squat
in providing either an optimum algorithm for its computation or its
condition.

--
Bye,
Hrundi V.B.
Back to top
Peter K.
Guest





Posted: Tue Dec 13, 2005 5:16 pm    Post subject: Re: Eigenvalue Accuracy in Matlab Reply with quote

"Mr Hrundi V Bakshi" <mrhrundivbakshi@hotmail.com> writes:

Quote:
"Peter K." <p.kootsookos@remove.ieee.org> wrote in message
news:uhd9ejyc8.fsf@remove.ieee.org...
"Mr Hrundi V Bakshi" <mrhrundivbakshi@hotmail.com> writes:

Good point. Also, a dconig for the A in question reveals that Matlab is
not
to be trusted in fp arithmetic: indeed that Tr(A) == 0 is sufficient to
..., anyways, do your own homework!

You're just upset because you gave the wrong advice, and don't realise
that "0.0000" in matlab is not really zero. Go do your own homework!


I couldn't give a rat's ass what Matlab produces: it's an overpriced tool
within the budget of the naive.
For the A in question, its eigenvalues are threefold degenerately naught 0,
not "0.0000" or any othersuch boloney. Sorry that this escaped you.

It escaped you, that's all I was pointing out. :-)

Ciao,

Peter K.
Back to top
Bhaskar Thiagarajan
Guest





Posted: Tue Dec 13, 2005 11:34 pm    Post subject: OT - Cleve Moler!! Re: Eigenvalue Accuracy in Matlab Reply with quote

"Cleve Moler" <moler@mathworks.com> wrote in message
news:dnl992$c7v$1@fred.mathworks.com...
Quote:
I am afraid that Don has fallen victim to a widely believed misconception.
The condition number of a matrix has nothing to do with the sensitivity or
computed accuracy of its eigenvalues. The condition number of a matrix
measures nearness to singularity. A matrix is singular if and only if it
has an eigenvalue equal to zero. The condition number of the matrix of
eigenvectors is the crucial quantity. If a matrix fails to have a full
set of linearly independent eigenvectors, then its eigenvalues are
sensitive
to perturbations, including roundoff error. Such matrices are called
"defective".

This particular example happens to be both singular and defective. If
any scalar value is added to the diagonal elements, then the matrix is no
longer singular, but that scalar value becomes the sensitive eigenvalue.

-- Cleve
moler@mathworks.com

Wow! Cleve Moler writing on comp.dsp - I know we do a fair amount of
Mathworks bashing here, but I'm impressed.
For those who don't know, he was one of the founders.

Cheers
Bhaskar


Quote:
In article <dnin9k$4u0$1@fred.mathworks.com>,
Don Orofino <don@mathworks.com> wrote:
Adding very little to the excellent advice given here, a practical method
for assessing "goodness" of the matrix is to compute its condition
number.
Well-conditioned matrices will return a reciprocal condition (rcond)
result
close to unity; ill-conditioned matrices have rcond close to machine eps.
Accuracy of eig, backsolvers, etc, are all sensitive to condition number.
Your matrix reveals:

rcond(A)
ans =
8.6357e-018

It's very poorly conditioned ( eig returns digital dandruff ;-) ) Use
rcond
to quickly identify ill-conditioned systems.

--Don


"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in
message

news:ellieandrogerxyzzy-1012052135450001@pool1430.cvx4-bradley.dialup.earth
link.net...
In article <irtwxu9y.fsf@ieee.org>, Randy Yates <yates@ieee.org> wrote:

Hi Folks,

Consider the following integer matrix:

A =

1 0 -1
-1 1 0
3 -1 -2

A is a nilpotent matrix of index 3, as can be seen by evaluating A^3.
So then the only eigenvalues of A are zero.

However, Matlab's "eig" function returns:

ans =

-7.178125070607518e-006
3.589062535291640e-006 +6.216541114106220e-006i
3.589062535291640e-006 -6.216541114106220e-006i

Is there no way to get exact results for such simple matrices? Or
is there a way to establish some sort of rounding for these types
of functions?
--
% Randy Yates
----------------------------
As to the numerical computation of A's eigenvalues, in this case they
are the roots to the cubic equation

0 = det(A - lambda*eye(3)) = -lambda^3

Suppose that matlab, in the process of carrying out a complicated
algorithm for eigenvalue/eigenvector solutions makes a very small
roundoff
error out in the 16-th decimal place in the process and arrives at this
equation

-lambda^3 = 3.698563363842292e-16

instead. In this case the solutions for lambda would be:

-7.178125070607523e-06
3.589062535303763e-06 + 6.216438662688082e-06i
3.589062535303763e-06 - 6.216438662688082e-06i

which are quite close to those you obtained!

The point here is that, for this particular ill-conditioned matrix, a
very small rounding error in computing the eigenvalue equation, well
within the limits that could be expected for 64-bit floating point
accuracy, will result in greatly expanded errors for the eigenvalues
themselves. Such instability is inherent in a matrix in which a
multiplicity of its eigenvalues are at, or very close to, zero.

(Remove "xyzzy" and ".invalid" to send me email.)
Roger Stafford



Back to top
robert bristow-johnson
Guest





Posted: Wed Dec 14, 2005 1:16 am    Post subject: Re: OT - Cleve Moler!! Re: Eigenvalue Accuracy in Matlab Reply with quote

Eric Jacobsen wrote:
Quote:
On Tue, 13 Dec 2005 09:34:36 -0800, "Bhaskar Thiagarajan"
bhaskart@deja.com> wrote:
....
Wow! Cleve Moler writing on comp.dsp -

Randy's original post and the whole thread was crossposted to
comp.soft-sys.matlab which, i would think, would be monitored by TMW
folks, including Cleve.

Quote:
I know we do a fair amount of
Mathworks bashing here, but I'm impressed.
For those who don't know, he was one of the founders.

we know, we know...

Quote:
He's been here plenty of times in the past, including during our
Matlab bashing regarding ones-based indexing.

that brings me back. maybe 1999 or 2000, i think. it's still
inexcusable, but since TMW has been so deaf about this, it's just more
people for Mathematica or Octave.

and it's not that it's one-based, but it can *only* be one-based
without any real option to set it to a different base.

Quote:
His technical input is
always good and welcomed (as cited above), but he's seemed completely
unsympathetic regarding the indexing issues.

especially since we have fully dispelled his stated reason for not
adopting an adjustable base (that it would not be backward compatible)

Quote:
There are a number of well-known folks, techno-deities, so to speak,
that show up here from time to time. It's always nice to hear from
them, IMHO.

Bob Adams has posted here recently regarding some weird Fourier
Transform problem. i think it is accurate that he has been the
principal designer of the first monolithic asynchronous sample rate
converter (and was one of the pioneers of sigma-delta) which puts him
at least in the techno-high-priesthood.

Hello Cleve: just to let you know that your unresponsiveness regarding
this need for an adjustable index base has lost TMW at least two
customers that i know of. you should have heeded Tom Krause's advice
15 years ago (not for the sake of 2 potential customers but because
MATLAB could have lived to its advertized potential). such a shame.

Melly Clistmas.

r b-j rbj@audioimagination.com

"Imagination is more important than knowledge."
Back to top
Eric Jacobsen
Guest





Posted: Wed Dec 14, 2005 1:16 am    Post subject: Re: OT - Cleve Moler!! Re: Eigenvalue Accuracy in Matlab Reply with quote

On Tue, 13 Dec 2005 09:34:36 -0800, "Bhaskar Thiagarajan"
<bhaskart@deja.com> wrote:

Quote:
"Cleve Moler" <moler@mathworks.com> wrote in message

....

Quote:
This particular example happens to be both singular and defective. If
any scalar value is added to the diagonal elements, then the matrix is no
longer singular, but that scalar value becomes the sensitive eigenvalue.

-- Cleve
moler@mathworks.com

Wow! Cleve Moler writing on comp.dsp - I know we do a fair amount of
Mathworks bashing here, but I'm impressed.
For those who don't know, he was one of the founders.

Cheers
Bhaskar

He's been here plenty of times in the past, including during our
Matlab bashing regarding ones-based indexing. His technical input is
always good and welcomed (as cited above), but he's seemed completely
unsympathetic regarding the indexing issues.

There are a number of well-known folks, techno-deities, so to speak,
that show up here from time to time. It's always nice to hear from
them, IMHO.

Eric Jacobsen
Minister of Algorithms, Intel Corp.
My opinions may not be Intel's opinions.
http://www.ericjacobsen.org
Back to top
Mr Hrundi V Bakshi
Guest





Posted: Wed Dec 14, 2005 9:16 am    Post subject: Re: Eigenvalue Accuracy in Matlab Reply with quote

"Peter K." <p.kootsookos@remove.ieee.org> wrote in message
news:uek4hgp00.fsf@remove.ieee.org...
Quote:
"Mr Hrundi V Bakshi" <mrhrundivbakshi@hotmail.com> writes:

"Peter K." <p.kootsookos@remove.ieee.org> wrote in message
news:uhd9ejyc8.fsf@remove.ieee.org...
"Mr Hrundi V Bakshi" <mrhrundivbakshi@hotmail.com> writes:

Good point. Also, a dconig for the A in question reveals that
Matlab is
not
to be trusted in fp arithmetic: indeed that Tr(A) == 0 is
sufficient to
..., anyways, do your own homework!

You're just upset because you gave the wrong advice, and don't
realise
that "0.0000" in matlab is not really zero. Go do your own homework!


I couldn't give a rat's ass what Matlab produces: it's an overpriced
tool
within the budget of the naive.
For the A in question, its eigenvalues are threefold degenerately
naught 0,
not "0.0000" or any othersuch boloney. Sorry that this escaped you.

It escaped you, that's all I was pointing out. :-)


Agreed. Now, if only Matlab could figure this!

--
Ciao,

Hrundi V.B.
Back to top
Stan Pawlukiewicz
Guest





Posted: Wed Dec 14, 2005 5:16 pm    Post subject: Re: OT - Cleve Moler!! Re: Eigenvalue Accuracy in Matlab Reply with quote

Eric Jacobsen wrote:
Quote:
On Tue, 13 Dec 2005 09:34:36 -0800, "Bhaskar Thiagarajan"
bhaskart@deja.com> wrote:


"Cleve Moler" <moler@mathworks.com> wrote in message


...


This particular example happens to be both singular and defective. If
any scalar value is added to the diagonal elements, then the matrix is no
longer singular, but that scalar value becomes the sensitive eigenvalue.

-- Cleve
moler@mathworks.com

Wow! Cleve Moler writing on comp.dsp - I know we do a fair amount of
Mathworks bashing here, but I'm impressed.
For those who don't know, he was one of the founders.

Cheers
Bhaskar


He's been here plenty of times in the past, including during our
Matlab bashing regarding ones-based indexing. His technical input is
always good and welcomed (as cited above), but he's seemed completely
unsympathetic regarding the indexing issues.

Not just that but they used to be a lot free'r with tee shirts and nerf
Frisbees. There were also some undocumented function in versions prior
to 4, like "lala" that appeared to be censored by the thought police.
They don't include the Lena image in their gallery, either. They just
seems to have lost all the fun aspects of the old days.


Quote:

There are a number of well-known folks, techno-deities, so to speak,
that show up here from time to time. It's always nice to hear from
them, IMHO.

Eric Jacobsen
Minister of Algorithms, Intel Corp.
My opinions may not be Intel's opinions.
http://www.ericjacobsen.org
Back to top
Eric Jacobsen
Guest





Posted: Wed Dec 14, 2005 5:16 pm    Post subject: Re: OT - Cleve Moler!! Re: Eigenvalue Accuracy in Matlab Reply with quote

On Wed, 14 Dec 2005 08:27:51 -0500, Stan Pawlukiewicz
<spam@spam.mitre.org> wrote:

Quote:
Not just that but they used to be a lot free'r with tee shirts and nerf
Frisbees.

Wow, you have a good memory. I'd forgotten about the shirts and
Frisbees. Those were the days... ;)

Oh, wait, I'm just realizing that I've been wearing that shirt for a
long time. It's now only worn in the garage and has some holes in
it...probably close to becoming a shop rag...

Quote:
There were also some undocumented function in versions prior
to 4, like "lala" that appeared to be censored by the thought police.
They don't include the Lena image in their gallery, either. They just
seems to have lost all the fun aspects of the old days.

Yeah, bummer. :(

Eric Jacobsen
Minister of Algorithms, Intel Corp.
My opinions may not be Intel's opinions.
http://www.ericjacobsen.org
Back to top
Peter K.
Guest





Posted: Thu Dec 15, 2005 8:07 am    Post subject: Re: OT - Cleve Moler!! Re: Eigenvalue Accuracy in Matlab Reply with quote

Eric Jacobsen <eric.jacobsen@ieee.org> writes:

Quote:

There were also some undocumented function in versions prior
to 4, like "lala" that appeared to be censored by the thought police.
They don't include the Lena image in their gallery, either. They just
seems to have lost all the fun aspects of the old days.

Yeah, bummer. :(


Yeah, I remember typing one expletive into matlab, in frustration, and
it came back with "Your place or mine?".

Most amusing. :0)

Ciao,

Peter K.
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB