Re: Orientation? was: Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Tracy Wadleigh
+10**10**10 On Sep 10, 2016 3:32 PM, "Steven G. Johnson" wrote: > > > > On Saturday, September 10, 2016 at 12:20:25 PM UTC-4, Stuart Brorson wrote: >> >> However, from a physics perspective, this bugs me. In physics, an >> important feature of a space is its orientation.

Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread colintbowers
This question pops up on StackOverflow fairly frequently, although usually in relation to Mathematica, which uses a totally different normalisation to most other languages. I was surprised by your question actually, since I thought Matlab and Julia used *exactly* the same normalisation, but

Re: Orientation? was: Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Steven G. Johnson
On Saturday, September 10, 2016 at 12:20:25 PM UTC-4, Stuart Brorson wrote: > > However, from a physics perspective, this bugs me. In physics, an > important feature of a space is its orientation. I should also remind you that a lot of modern physics tries to separate the laws of physics

Re: Orientation? was: Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Christoph Ortner
Yichao is right, you cannot give eigenvectors an orientation; A good way to think of them is as defining linear subspaces. So what is unique is the projector v\|v| \otimes v/|v| or in the case of multiple e-vals the projector onto the eigenspace \sum v_i \otimes v_i. But never the e-evecs

Re: Orientation? was: Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Yichao Yu
On Sat, Sep 10, 2016 at 2:18 PM, Yichao Yu wrote: > > > On Sat, Sep 10, 2016 at 2:12 PM, Stuart Brorson wrote: > >> I don't think you can define that in a continuous way. >>> In general, if your application relies on certain property of the basis, >>> you

Re: Orientation? was: Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Yichao Yu
On Sat, Sep 10, 2016 at 2:12 PM, Stuart Brorson wrote: > I don't think you can define that in a continuous way. >> In general, if your application relies on certain property of the basis, >> you should just normalize it that way. If you don't have a requirement >> than >> you

Re: Orientation? was: Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Stuart Brorson
I don't think you can define that in a continuous way. In general, if your application relies on certain property of the basis, you should just normalize it that way. If you don't have a requirement than you should worry about it. Thanks for the thoughts. I did a little more thinking and

Re: Orientation? was: Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Yichao Yu
On Sat, Sep 10, 2016 at 12:20 PM, Stuart Brorson wrote: > Just a question from a non-mathematician. Also, this is a math > question, not a Julia/Matlab question. > > I agree that Matlab and Julia are both correct -- within the > definitions of eigenvector and eigenvalue they

Orientation? was: Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Stuart Brorson
Just a question from a non-mathematician. Also, this is a math question, not a Julia/Matlab question. I agree that Matlab and Julia are both correct -- within the definitions of eigenvector and eigenvalue they compute, it's OK that one eigenvector differes between the two by a factor -1.

Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Dennis Eckmeier
Thanks, that's reassuring. On Saturday, September 10, 2016 at 4:15:23 PM UTC+1, Tracy Wadleigh wrote: > > Looks good to me. The eigenvalues look the same up to the precision shown > and eigenvectors are only unique up to a scalar multiple. > > On Sep 10, 2016 8:11 AM, "Dennis Eckmeier" < >

Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Tracy Wadleigh
Looks good to me. The eigenvalues look the same up to the precision shown and eigenvectors are only unique up to a scalar multiple. On Sep 10, 2016 8:11 AM, "Dennis Eckmeier" < dennis.eckme...@neuro.fchampalimaud.org> wrote: > Hi! > > Here is a simple example: > > *Matlab:* > (all types are

Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Dennis Eckmeier
Hi! Here is a simple example: *Matlab:* (all types are double) covX(1:4,1:4) 1.0e+006 * 3.86263.41572.40491.2403 3.41573.73753.33952.3899 2.40493.33953.73723.4033 1.24032.38993.40333.8548 [V,D] = eig(covX(1:4,1:4)) V =

Re: [julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Michele Zaffalon
You mean they are not simply permuted? Can you report the MATLAB and Julia results in the two cases for a small covX matrix? On Sat, Sep 10, 2016 at 1:34 PM, Dennis Eckmeier < dennis.eckme...@neuro.fchampalimaud.org> wrote: > Hi, > > I am new to Julia and rather lay in math. For practice, I am

[julia-users] different Eigenvalue results Julia vs Matlab

2016-09-10 Thread Dennis Eckmeier
Hi, I am new to Julia and rather lay in math. For practice, I am translating a Matlab script (written by somebody else) and compare the result of each step in Matlab and Julia. The Matlab script uses [V,D] = eig(covX); which I translated to Julia as: (D,V) = eig(covX) However, the outcomes