bugGNU Octave - Bugs: bug #39462, Diagonal matrices do not broadcast

 
 

bug #39462: Diagonal matrices do not broadcast

Submitter:  None
Submitted:  Thu 11 Jul 2013 02:28:03 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  dspyz Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 11 Jul 2013 02:28:03 AM UTC, original submission:  

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

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-07-11 jordigh StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #35787

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code