MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Eigenvalues



Daniel Lichtblau wrote:
> 
> Raya Khanin wrote:
> >
> > Hi,
> >
> > I have a problem of calculating eigenvalues  for a simple 4X4 matrix. I
> > am working on Sun workstation, and it takes minutes and minutes for
> > Mathematica to  perform Eigenvalues[] operation for a matrix like this
> >
> > Clear[a, b, c, d, e, d, f, g];
> > testmatrix = {{a, b, c, d}, {b, c, d, e}, {c, d, e, f}, {d, e, f, g}};
> > Eigenvalues[testmatrix];
> >
> 
> I get a huge result quite quickly. To improve on the size, try
> 
> In[72]:= testmatrix = {{a, b, c, d}, {b, c, d, e},
>         {c, d, e, f}, {d, e, f, g}};
> 
> In[73]:= Timing[ev = Eigenvalues[testmatrix];] Out[73]= {0.83 Second,
> Null}
> 
> In[74]:= LeafCount[ev]
> Out[74]= 1449
> ...
> Daniel Lichtblau
> Wolfram Research

Sorry, I missed an important line in the cut-and-paste.

First do

SetOptions[Roots, Quartics->False]

This is because Eigenvalues will, in the symbolic case, compute and call
Roots on the characteristic polynomial.

(Still Daniel Lichtblau at WRI)



  • Prev by Date: Re: TELLING PROGRAM THAT A VARIABLE IS AN INTEGER
  • Next by Date: Re: Can You Change Domain in ListContourPlot?
  • Prev by thread: Re: Eigenvalues
  • Next by thread: RE: Eigenvalues