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

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

[Octave-bug-tracker] [bug #55141] sparse matrix/vector comparison


From: Ray Zimmerman
Subject: [Octave-bug-tracker] [bug #55141] sparse matrix/vector comparison
Date: Fri, 30 Nov 2018 15:49:47 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.1 Safari/605.1.15

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

                 Summary: sparse matrix/vector comparison
                 Project: GNU Octave
            Submitted by: rdzman
            Submitted on: Fri 30 Nov 2018 08:49:46 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: rdzman
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: Any

    _______________________________________________________

Details:

Comparing a matrix with a vector works fine for full and sparse matrices on
Matlab, but on Octave it gives an error for sparse matrices.


octave:1> A = [1 3; 7 5]; b = [2; 6];
octave:2> A < b
ans =

  1  0
  0  1

octave:3> sparse(A) < sparse(b)
error: mx_el_lt: nonconformant arguments (op1 is 2x2, op2 is 2x1)


On Matlab, however, it works fine ...


>> A = [1 3; 7 5]; b = [2; 6];
>> A < b

ans =

  2x2 logical array

   1   0
   0   1

>> sparse(A) < sparse(b)

ans =

  2x2 sparse logical array

   (1,1)      1
   (2,2)      1






    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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