bugGNU Octave - Bugs: bug #40374, incorrect broadcasting with non...

 
 

bug #40374: incorrect broadcasting with non diagonal matrices

Submitter:  jose <josombio>
Submitted:  Fri 25 Oct 2013 05:10:21 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  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
   

Mon 28 Oct 2013 03:53:06 AM UTC, comment #1: 

Yes, this looks identical to bug #38466. All of your examples that fail are due to using arithmetic-assignment operators. If you switch to


d = d + ones (3)


there is no error. Also does not error if the size of d does not change as a result of the operation.

Closing as a duplicate.

Mike Miller <mtmiller>
Group Member
Fri 25 Oct 2013 05:10:21 PM UTC, original submission:  

I have read several bug reports about cases in which broadcasting does not work properly, such as #39462 and #38466. The first one is about diagonal matrices, and is closed. This report might be related to the second one.

In octave 3.6.4 there are cases in which broadcasting does not work well involving non diagonal matrices. Just in case this is not known/solved, here I point it out.

Examples of diagonal matrices:
--------------
octave:6> clear
octave:7>
octave:8> d=[1 2 3];
octave:9> d.+=ones(3)
error: +=: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:9> d.-=ones(3)
error: -=: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:9> d./=ones(3)
error: ./=: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:9> d.*=ones(3)
error: .*=: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:9> d.*=rand(3)
error: .*=: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:9> d.*=eye(3); %this works
------------
An now non diagonal
------------
octave:1> d=[1 2 3];
octave:2> d.*=rand(3)
error: .*=: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:2> d.+=rand(3)
error: +=: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:2> d.-=rand(3)
error: -=: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:2> d./=rand(3)
error: ./=: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:2> d./=rand(3)
------------


jose <josombio>

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by josombio (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-10-28 mtmiller StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #38466

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code