[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 |
URL:
<https://savannah.gnu.org/bugs/?56592>
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
_______________________________________________________
Details:
The unique() function seems to have an incorrect default value.
The [matlab documentation states
https://uk.mathworks.com/help/matlab/ref/unique.html?searchHighlight=unique&s_tid=doc_srchtitle]:
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 =
1
2
3
Octave 5.1.0:
[a,b] = unique([1,2,3,1])
a =
1 2 3
b =
4 2 3
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56592>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56592] unique() output-dimensions and (first/last)-option default incompatible,
Markus Ebner <=