octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #38357] SVD returns a matrix that allows index


From: anonymous
Subject: [Octave-bug-tracker] [bug #38357] SVD returns a matrix that allows indexing past its bounds
Date: Wed, 20 Feb 2013 19:15:26 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17

URL:
  <http://savannah.gnu.org/bugs/?38357>

                 Summary: SVD returns a matrix that allows indexing past its
bounds
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 20 Feb 2013 07:15:24 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Bryan Poling
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.3
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38357>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]