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

 
 

bug #39462: Diagonal matrices do not broadcast

Submitted by:  None
Submitted on:  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

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project 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.5