bugGNU Octave - Bugs: bug #35946, diag([a],b,c) fills matrix with...

 
 

bug #35946: diag([a],b,c) fills matrix with strange values

Submitted by:  None
Submitted on:  Thu 22 Mar 2012 02:23:10 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Jordi Gutiérrez Hermoso <jordigh>
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.1
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.

 

Tue 17 Apr 2012 03:55:01 PM UTC, comment #4:

I also checked in the following change on the stable branch so that filling will work correctly for three-arg diag function calls with cell array arguments:

http://hg.savannah.gnu.org/hgweb/octave/rev/5bb5fcffa29d

John W. Eaton <jwe>
Project Administrator
Fri 23 Mar 2012 07:53:11 AM UTC, comment #3:

Thanks for the patch, it works.

However, the expression 'diag ([1,2,3], 6, 3)' that is used as testcase in the commit works perfectly (on my systems) with unpatched Octaves. I suggest 'diag([0],6,3)' or 'diag ([0], 6, 6)' testcase. On my milage it is important that the first argument is scalar.

Anonymous
Thu 22 Mar 2012 04:25:13 PM UTC, comment #2:

Alright, fixed:

http://hg.savannah.gnu.org/hgweb/octave/rev/3959f3f81e33

Thanks for reporting. This will show up in our 3.6.2 maintenance release.

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Thu 22 Mar 2012 02:55:47 PM UTC, comment #1:

> This behaviour seems to be version/build/system dependent.
> Sometimes the result varies with time.


Yeah, such is the nature of nasal demons...

I'll look into it.

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Thu 22 Mar 2012 02:23:10 PM UTC, original submission:

Example:

User input:

> diag([0],6,3)


Actual result:
0.0000e+00 5.5502e-268 5.5520e-268
5.5442e-268 5.5505e-268 5.5523e-268
5.5425e-268 5.5508e-268 5.5526e-268
5.5444e-268 5.5511e-268 5.5529e-268
5.5428e-268 5.5514e-268 5.5532e-268
5.5499e-268 5.5517e-268 3.6144e-313

Expected: zero 6x3 matrix

This behaviour seems to be version/build/system dependent. Sometimes the result varies with time.

To reproduce, please also try varying b and c, like that: diag(3,3,3), diag(4,4,4), diag(6,6,6), diag(9,9,9).

Tested on Octave 3.6.0 @x86 Intel Core2 Quad and Octave 3.4.3 @x86_64 Intel Xeon.

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  • -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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 22 Mar 2012 04:25:13 PM UTCjordighStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Release3.6.0=>3.6.1
    Thu 22 Mar 2012 02:55:46 PM UTCjordighStatusNone=>Confirmed
      Assigned toNone=>jordigh

    Back to the top


    Powered by Savane 3.1-cleanup1