bugGNU Octave - Bugs: bug #38357, diagonal matrices can be indexed...

 
 

bug #38357: diagonal matrices can be indexed beyond their bounds

Submitted by:  None
Submitted on:  Wed 20 Feb 2013 07:15:24 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Bryan PolingOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.3
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.

 

Wed 20 Feb 2013 09:37:58 PM UTC, comment #2:

Fixed on dev branch:

http://hg.savannah.gnu.org/hgweb/octave/rev/1c8234f0b642

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed 20 Feb 2013 07:29:34 PM UTC, comment #1:

svd is irrelevant. The problem is the diagonal matrix type. Simpler way to reproduce this:

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed 20 Feb 2013 07:15:24 PM UTC, original submission:

Run the following:

A = rand(10,5);
[U,S,V] = svd(A);

size(S) %You will see that S is 10 x 5

S(6,6) %This element does not exist and so this should generate an error. It does not - instead some other value is returned.

Now run:
B = S;
size(B) %You will see that B is 10 x 5
B(6,6) %We get the same value we did before so the problem survives "copying".

If we run:
B = zeros(10,5);
B(6,6)

We get an out-of-bounds error. This is the correct behavior, and it is what we should get when dealing with S above, but we do not.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 20 Feb 2013 09:37:58 PM UTCjordighStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 20 Feb 2013 07:29:34 PM UTCjordighStatusNone=>Confirmed
      SummarySVD returns a matrix that allows indexing past its bounds=>diagonal matrices can be indexed beyond their bounds

    Back to the top


    Powered by Savane 3.1-cleanup1