octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61238] Diagonal Martices are not implicitly c


From: anonymous
Subject: [Octave-bug-tracker] [bug #61238] Diagonal Martices are not implicitly converted when adding/subtracting
Date: Tue, 28 Sep 2021 13:35:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?61238>

                 Summary: Diagonal Martices are not implicitly converted when
adding/subtracting
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 28 Sep 2021 05:35:25 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: Sal
        Originator Email: salBakraa@gmail.com
             Open/Closed: Open
                 Release: 6.3.0
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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. 




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61238>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]