bugGNU Octave - Bugs: bug #41795, Unexpected eigenvector matrix from...

 
 

bug #41795: Unexpected eigenvector matrix from eigs

Submitted by:  None
Submitted on:  Thu 06 Mar 2014 07:23:41 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Gertjan van den BurgOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.0
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Tue 27 May 2014 07:01:13 PM UTC, comment #8:

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/1782f5294fdc

If this doesn't introduce any other problems, please close this report.

Thanks.

John W. Eaton <jwe>
Project Administrator
Tue 27 May 2014 05:20:33 PM UTC, comment #7:

The patch works for me. It might be useful to put in a %!test for the dimensions of V so that this bug doesn't return.

Rik <rik5>
Project Administrator
Tue 27 May 2014 04:42:14 PM UTC, comment #6:

Is the fix for this problem as simple as the attached patch? Maybe I just got the selection of columns/rows reversed...

(file #31448)

John W. Eaton <jwe>
Project Administrator
Fri 14 Mar 2014 02:51:53 AM UTC, comment #5:

This bug is confirmed, and it is a regression from 3.6.4 where the dimensions are correct. The problem is with some new code added to handle low-dimension matrices where eigs shifts over to using eig instead. I'm adding jwe, who wrote that code, to the CC list for this bug.

Rik <rik5>
Project Administrator
Fri 07 Mar 2014 11:27:05 AM UTC, comment #4:

In comment #3, K should be Z.

Gertjan van den Burg <gjjvdburg>
Fri 07 Mar 2014 11:25:45 AM UTC, comment #3:

(OP here)

The fact that V is 8x10 is the error. Since K is symmetric, it is expected that it holds that K = VDV'. For this product to be possible, V should be 10x8.

In reply to the oneliner working. It does indeed work, but also yields a V of unexpected dimensions.

Gertjan van den Burg <gjjvdburg>
Fri 07 Mar 2014 09:01:54 AM UTC, comment #2:

There should be an edit-function.
Of course I could reproduce, that V is 8x10, but I don't know, whether that is an error. However, the oneliner really worked.

Max Görner <maxg>
Fri 07 Mar 2014 08:57:03 AM UTC, comment #1:

I tried to reproduce the error, but I couldn't.

Furthermore,

Max Görner <maxg>
Thu 06 Mar 2014 07:23:41 PM UTC, original submission:

The following code returns an unexpected result:

On my system, it shows that `V` is 8x10. However, this means that the product `VDV'` cannot be computed. From the documentation of eigs one would expect `V` to be 10x8:

"With two return arguments, V is a N-by-K matrix whose columns are the K eigenvectors corresponding to the returned eigenvalues."
(note that here, K = 8 and N = 10)

Checking the product `V(:, 1:r)DV(:, 1:r)'` shows that this corresponds to `Z(1:r, 1:r)`, indicating that the first `r` columns of `V` are correct, but the last 2 rows are omitted (instead of the last 2 columns, as expected).

Comparison with the same code in MATLAB R2013a shows that there `V` is 10x8 as expected.

As a final note, the following also fails

whereas the using 7 and 10 as value for K both work. A work-around is therefore to use:

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #31448:  diffs.txt added by jwe (258B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by gjjvdburg (Posted a comment)
  • -unavailable- added by maxg (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 27 May 2014 10:23:56 PM UTCrik5StatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Tue 27 May 2014 05:20:33 PM UTCrik5StatusConfirmed=>In Progress
    Tue 27 May 2014 04:42:14 PM UTCjweAttached File-=>Added diffs.txt, #31448
    Fri 14 Mar 2014 02:51:53 AM UTCrik5Item GroupIncorrect Result=>Regression
      StatusNone=>Confirmed
      Carbon-Copy-=>Added jwe

    Back to the top


    Powered by Savane 3.1-cleanup1