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 FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: DuplicateAssigned to: None
Originator Name: dspyzOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 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 File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

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

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 11 Jul 2013 01:02:26 PM UTCjordighStatusNone=>Duplicate
      Open/ClosedOpen=>Closed
      Dependencies-=>Depends on bugs #35787

    Back to the top


    Powered by Savane 3.1-cleanup1