Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Saket
Everything's working now. I just messed up the rows and columns. Thanks a lot, guys. On Sun, Jun 29, 2008 at 10:35 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Sun, Jun 29, 2008 at 21:14, Saket <[EMAIL PROTECTED]> wrote: >> Also, I'm getting different numbers when I do the above using eig(A)

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Robert Kern
On Sun, Jun 29, 2008 at 21:14, Saket <[EMAIL PROTECTED]> wrote: > Also, I'm getting different numbers when I do the above using eig(A) > and eigh(A). I thought eigh would be faster, but would still give the > same results... What different numbers? Remember, as Chuck pointed out, you have a multip

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Robert Kern
On Sun, Jun 29, 2008 at 21:00, Saket <[EMAIL PROTECTED]> wrote: > Hmm... so the relationship Ax = Lx should hold for every eigenvalue > and corresponding eigenvector of A, right? But, consider the first > eigenvalue,eigenvector pair: > >for i,eval in enumerate(d): >print abs(numpy.dot(A

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Saket
Also, I'm getting different numbers when I do the above using eig(A) and eigh(A). I thought eigh would be faster, but would still give the same results... On Sun, Jun 29, 2008 at 10:00 PM, Saket <[EMAIL PROTECTED]> wrote: > Hmm... so the relationship Ax = Lx should hold for every eigenvalue > and

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Saket
Hmm... so the relationship Ax = Lx should hold for every eigenvalue and corresponding eigenvector of A, right? But, consider the first eigenvalue,eigenvector pair: for i,eval in enumerate(d): print abs(numpy.dot(A,v[i]) - numpy.dot(eval,v[i])).max() return Outputs: 1.928 I th

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Charles R Harris
On Sun, Jun 29, 2008 at 6:47 PM, Saket <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having this weird problem when computing eigenvalues/vectors with > Numpy. I have the following symmetric matrix, B: > > -0.34620.65380.5385 -0.46150.6538 -0.3462 -0.3462 > -0.3462 >0.6538 -0.

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Charles R Harris
On Sun, Jun 29, 2008 at 6:47 PM, Saket <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having this weird problem when computing eigenvalues/vectors with > Numpy. I have the following symmetric matrix, B: > > -0.34620.65380.5385 -0.46150.6538 -0.3462 -0.3462 > -0.3462 >0.6538 -0.

[Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Saket
Hi, I'm having this weird problem when computing eigenvalues/vectors with Numpy. I have the following symmetric matrix, B: -0.34620.65380.5385 -0.46150.6538 -0.3462 -0.3462 -0.3462 0.6538 -0.34620.5385 -0.46150.6538 -0.3462 -0.3462 -0.3462 0.5385