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

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

[Octave-bug-tracker] [bug #42577] setdiff output dimension inconsistency


From: Johan Löfberg
Subject: [Octave-bug-tracker] [bug #42577] setdiff output dimension inconsistency
Date: Wed, 18 Jun 2014 07:17:57 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0

URL:
  <http://savannah.gnu.org/bugs/?42577>

                 Summary: setdiff output dimension inconsistency
                 Project: GNU Octave
            Submitted by: johanlofberg
            Submitted on: Wed 18 Jun 2014 07:17:56 AM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.1
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

The logic on the dimension of the output from setdiff is not consistent with
the behavior in MATLAB.

MATLAB behavior
1st input row second scalar: Output row
1st input column second scalar: Output column (*)

1st input row second row: Output row
1st input row second column: Output row

1st input column second row: Output row
1st input column second column: Output column

So, if some input is a row, output a row.

Octave follows these rules, except for the case (*)

++++
debug> setdiff((1:5)',[2])
ans =

   1   3   4   5
----





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42577>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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