bugGNU Octave - Bugs: bug #45511, eig() sometimes accepts second...

 
 

bug #45511: eig() sometimes accepts second matrix without using it

Submitted by:  None
Submitted on:  Thu 09 Jul 2015 09:21:51 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 15 Sep 2015 12:56:43 PM UTC, comment #5:

Finally pushed the fix for this one to the default branch, sorry about losing track of this one:

http://hg.savannah.gnu.org/hgweb/octave/rev/ff904ae0285b

Mike Miller <mtmiller>
Project Administrator
Fri 10 Jul 2015 06:53:04 PM UTC, comment #4:

Mike,

I checked that with your patch the originally submitted bug is fixed and the following test passes

while it fails on my (original) 3.8.2.

Marco

Marco Caliari <caliari>
Project Member
Fri 10 Jul 2015 04:38:21 PM UTC, comment #3:

Yep, I think Marco nailed it. The floating point version also needs to be fixed. Can you test the attached diff? Needs test cases added preferably before pushing.

(file #34414)

Mike Miller <mtmiller>
Project Administrator
Fri 10 Jul 2015 04:29:34 PM UTC, comment #2:

A poster at the thread I mentioned (http://stackoverflow.com/questions/31327630/scipy-linalg-eig-giving-different-eigenvectors-from-gnu-octaves-eig) noticed that this problem only occurs if the M matrix is diagonal.

Anonymous
Fri 10 Jul 2015 08:19:52 AM UTC, comment #1:

I guess the problem is at line 718 of EIG.cc. It should be

Marco

Marco Caliari <caliari>
Project Member
Thu 09 Jul 2015 09:21:51 PM UTC, original submission:

Sometimes, [V,D]=eig(K,M) solves the generalized eigenvalue equation lambda * M * v = K * v, but other times it doesn't.

For example, for K = [1 2; 3 4], M = [5 6; 7 8] it seems to work, and we get two different answers for eig(K) vs. eig(K,M).

However, for
K =
1.8000 + 0.0000i -1.0970 + 0.9550i
-1.0970 - 0.9550i 1.8000 + 0.0000i
and
M =
209 0
0 209
eig(K,M) gives the same answer as eig(K), which is incorrect.

(I also posted the issue here: http://stackoverflow.com/questions/31327630/scipy-linalg-eig-giving-different-eigenvectors-from-gnu-octaves-eig.)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #34414:  eig.diff added by mtmiller (940B - application/octet-stream)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by caliari (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 09 Feb 2016 12:47:19 AM UTCrik5Dependencies-=>bugs #47095 is dependent
    Tue 15 Sep 2015 12:56:43 PM UTCmtmillerStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 10 Jul 2015 04:38:21 PM UTCmtmillerAttached File-=>Added eig.diff, #34414
      Release3.8.2=>dev
      Operating SystemMac OS=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1