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

 
 

bug #40374: incorrect broadcasting with non diagonal matrices

Submitted by:  jose <josombio>
Submitted on:  Fri 25 Oct 2013 05:10:21 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: DuplicateAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.4Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

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

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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by josombio (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
    Mon 28 Oct 2013 03:53:06 AM UTCmtmillerStatusNone=>Duplicate
      Open/ClosedOpen=>Closed
      Dependencies-=>Depends on bugs #38466

    Back to the top


    Powered by Savane 3.1-cleanup