List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Bug in Eigenvectors?
| [MUG] Bug in Eigenvectors? |
|
Author:
Posted: Mon, 16 Dec 2002 14:11:11 +0100
|
>> From: />
Dear Maple users,
I would like you to give me a hand with an 8x8 complex matrix (T)
obtained from a mechanical wave problem. Two of its eigenvectors are
bad calculated by MAPLE (ie, T.vec~=lambda.vec), however all of them
are good enough when MATLAB is used. Eigenvalues are well calculated by
both packages. How can I test this matrix to know the causes of its bad
behaviour with respect to MATLAB?. Which are the main differences
between Matlab's algorithm and Maple's algorithm to obtain
eigenvectors?
Regards,
Iosu
|
| [MUG] Re: Bug in Eigenvectors? |
|
Author: Maple User Group
Posted: Fri, 20 Dec 2002 14:17:58 -0500
|
>> From: Maple User Group />
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 17 Dec 2002 11:29:48 -0800 (PST)
From: Robert Israel />
To: />
Subject: Bug in Eigenvectors?
It's really impossible to tell what the problem is from such a vague
description. Why don't you tell us the matrix? Also, which release
of Maple are you using? Are you using linalg or LinearAlgebra?
Robert Israel />
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 17 Dec 2002 14:53:18 -0800 (PST)
From: Benj FitzPatrick />
Subject: Bug in Eigenvectors?
To: />
Matlab uses linpak and eispak I believe, and is far
superior to Maple's linear algebra routines. As far
as eigenvalue and eigenvector calculation I would use
Matlab because this is one of Maple's weak points.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Dr Francis J. Wright" />
To: />
Subject: Bug in Eigenvectors?
Date: Wed, 18 Dec 2002 17:22:50 -0000
From: />
To: />
Sent: Monday, December 16, 2002 1:11 PM
Subject: [MUG] Bug in Eigenvectors?
> I would like you to give me a hand with an 8x8 complex matrix (T)
> obtained from a mechanical wave problem. Two of its eigenvectors are
> bad calculated by MAPLE (ie, T.vec~=lambda.vec), however all of them
> are good enough when MATLAB is used. Eigenvalues are well calculated by
> both packages. How can I test this matrix to know the causes of its bad
> behaviour with respect to MATLAB?. Which are the main differences
> between Matlab's algorithm and Maple's algorithm to obtain
> eigenvectors?
You haven't give much detail of how you are computing the eigenvalues in
Maple or of what exactly is wrong with the eigenvectors.
In Maple version 6 or later, I would recommend using the LinearAlgebra
package, and if necessary increase the numerical precision, e.g. by
increasing the value of Digits to something greater than about 16, until you
get satisfactory results. See the help topic LA_numerics for an overview of
Efficient Numeric Linear Algebra Computation.
The difference you are seeing may be because Matlab is by default using
higher numerical precision than Maple; I would be surprised if they are
using significantly different algorithms. Matlab is presumably using
hardware double precision, which probably gives about 16 significant
figures, which is larger than Maple's default setting for Digits, which is
10. This may or may not be relevant, depending on what Maple commands you
are using.
Francis
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Dr Francis J. Wright" />
To: />
Subject: Bug in Eigenvectors?
Date: Thu, 19 Dec 2002 17:34:47 -0000
I agree. Having parsed the printout of the matrix you sent me (which I may
or may not have done correctly, since you didn't explain the format) into a
list of lists representing columns assigned to a variable M, I executed the
following code (taken from my book "Computing with Maple") in Maple 8:
> with(LinearAlgebra):
> T := Matrix([M], scan=columns, datatype=complex[8]):
> Lambda, X := Eigenvectors(T):
> Norm(T.X - X.DiagonalMatrix(Lambda), 2);
-8
0.1115046865 10
This result looks reasonable to me. By contrast, Maple 7 gave 195.6144365,
which suggests that something is seriously wrong! Not specifying
datatype=complex[8] and setting Digits to 14, in an attempt to work to the
precision of your data, made no difference at all, in either version of
Maple.
Francis
----- Original Message -----
From: />
To: "Dr Francis J. Wright" />
Sent: Wednesday, December 18, 2002 6:42 PM
Subject: Re: [MUG] Bug in Eigenvectors?
I used LinearAlgebra package and, in the other hand, I have seen that
increasing Digits (70!!) does not improve the results. As I've just
told Mr. Israel, It seems that the trial version of MAPLE 8 obtains the
good answer for eigenvectors. In case you were interested in this
surprising problem I send you the matrix attached.
|
Previous by date: [MUG] how to implicitplot this func, Ruan Zhichao
Next by date: [MUG] Re: dsolve does not find second solution, Maple User Group
Previous thread: [MUG] Nargs, PierLuigi Zezza
Next thread: [MUG] dsolve does not find second solution, Helmut Kahovec
|