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

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

[Octave-bug-tracker] [bug #37411] Diagonal matrix attribution error and


From: anonymous
Subject: [Octave-bug-tracker] [bug #37411] Diagonal matrix attribution error and diag function bugs
Date: Thu, 20 Sep 2012 12:13:09 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1

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

                 Summary: Diagonal matrix attribution error and diag function
bugs
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 20 Sep 2012 12:13:08 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Steffen Hoernig
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.2
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

The following code creates a square matrix with [1,0] on the diagonal and
works fine

diag([1,0])


Now the following defines the unit vector e1 as a column of the identity
matrix. Note that it wrongy inherits "diagonal matrix" status from Id.

Id = eye(2); e1 = Id(:,1)


As a result, the diag function returns the number 1 instead of the above
diagonal matrix diag([1,0]):

diag(e1)





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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