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

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

[Octave-bug-tracker] [bug #39462] Diagonal matrices do not broadcast


From: anonymous
Subject: [Octave-bug-tracker] [bug #39462] Diagonal matrices do not broadcast
Date: Thu, 11 Jul 2013 02:28:04 +0000
User-agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.52 Chrome/28.0.1500.52 Safari/537.36

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

                 Summary: Diagonal matrices do not broadcast
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 11 Jul 2013 02:28:03 UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: dspyz
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.4
        Operating System: GNU/Linux

    _______________________________________________________

Details:

When I try to add a 3d matrix to a diagonal matrix, I get an invalid
conversion error.  But when adding to a (non-diagonal) matrix, it broadcasts
properly:

> a = diag(1:3);
> b = zeros(3,3,3);
> a + b
error: invalid conversion of NDArray to Matrix
> a(3,1)=2;
> a+b
warning: operator +: automatic broadcasting operation applied
ans =

ans(:,:,1) =

   1   0   0
   0   2   0
   2   0   3

ans(:,:,2) =

   1   0   0
   0   2   0
   2   0   3

ans(:,:,3) =

   1   0   0
   0   2   0
   2   0   3





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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