bugGNU Octave - Bugs: bug #61238, Diagonal Martices are not...

 
 

bug #61238: Diagonal Martices are not implicitly converted when adding/subtracting

Submitter:  None
Submitted:  Tue 28 Sep 2021 05:35:25 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Duplicate Assigned to:  None
Originator Name:  Sal Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 6.3.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 28 Sep 2021 05:47:24 PM UTC, comment #1: 

This report is a duplicate of bug #35787

See also bug #60968

John W. Eaton <jwe>
Group administrator
Tue 28 Sep 2021 05:35:25 PM UTC, original submission:  

I was confused that I got an error when adding an identity matrix but not when I was using a regular matrix with the same dimensions.


GNU Octave, version 6.3.0
Copyright (C) 2021 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at https://www.octave.org.

Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html

Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

octave:1> a = eye(3); b = ones(1,3); c = full(a);
octave:2> a + b
error: operator +: nonconformant arguments (op1 is 3x3, op2 is 1x3)
octave:3> b + a
error: operator +: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:4> a - b
error: operator -: nonconformant arguments (op1 is 3x3, op2 is 1x3)
octave:5> b - a
error: operator -: nonconformant arguments (op1 is 1x3, op2 is 3x3)
octave:6> b + c
ans =

   2   1   1
   1   2   1
   1   1   2

octave:7> c + b
ans =

   2   1   1
   1   2   1
   1   1   2

octave:8> b - c
ans =

   0   1   1
   1   0   1
   1   1   0

octave:9> c - b
ans =

   0  -1  -1
  -1   0  -1
  -1  -1   0


I am not sure if this happens for other algebraic operations, since even though I tested them; I am not aware of what the correct output should be.

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 siko1056 (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by None (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-04 siko1056 Open/ClosedOpen Closed
    2021-09-28 jwe StatusNone Duplicate
    2021-09-28 jwe Dependencies- Depends on bugs #35787
    2021-09-28 jwe DependenciesRemoved dependency to bugs #35857 -
    2021-09-28 jwe Dependencies- Depends on bugs #35857

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code