[Top][All Lists]

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

[Octave-bug-tracker] [bug #56592] unique() output-dimensions and (first/

From: Markus Ebner
Subject: [Octave-bug-tracker] [bug #56592] unique() output-dimensions and (first/last)-option default incompatible
Date: Mon, 8 Jul 2019 13:38:50 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0


                 Summary: unique() output-dimensions and (first/last)-option
default incompatible
                 Project: GNU Octave
            Submitted by: seijikun
            Submitted on: Mon 08 Jul 2019 05:38:49 PM UTC
                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: 5.1.0
        Operating System: GNU/Linux



The unique() function seems to have an incorrect default value.
The [matlab documentation states

C = unique(A,occurrence) specifies which indices to return in case of repeated
values. occurrence can be 'first' (default) or 'last'.

The matlab documentation states that "last" is the default.

Further: In Matlab, the second output is a column-vector, while the second
output is a row-vector.

Matlab R2019a:

[a,b] = unique([1,2,3,1])

a =
     1     2     3

b =

Octave 5.1.0:

[a,b] = unique([1,2,3,1])

a =
   1   2   3

b =
   4   2   3


Reply to this item at:


  Message sent via Savannah

reply via email to

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