bugGNU Octave - Bugs: bug #54034, unique function needs...

 
 

bug #54034: unique function needs "stable" setOrder argument for Matlab compatibility

Submitter:  Richard <crobar>
Submitted:  Sat 02 Jun 2018 09:26:33 AM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Richard Crozier Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 06 Aug 2019 05:04:12 AM UTC, comment #2: 

I went and implemented the 'stable' option for all of the set functions.  The starting changeset is 27291:c4f9a0f097a3.  This will be a part of the 6.1 release of Octave.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Sun 06 Jan 2019 01:52:24 PM UTC, comment #1: 
A.R. Burgers <arb>
Sat 02 Jun 2018 09:26:33 AM UTC, original submission:  

In Matlab the unique function now has a different syntax from Octave. Here is the Matlab syntax:

C = unique(A)
C = unique(A,setOrder)
C = unique(A,occurrence)
C = unique(A,___,'rows')
C = unique(A,'rows',___)
[C,ia,ic] = unique(_)
[C,ia,ic] = unique(A,'legacy')
[C,ia,ic] = unique(A,'rows','legacy')
[C,ia,ic] = unique(A,occurrence,'legacy')
[C,ia,ic] = unique(A,'rows',occurrence,'legacy')


setOrder can be 'stable' to preserve the order or 'sorted' (the default.

occurance is 'first' or 'last' (already supported in Octave).

see:

https://uk.mathworks.com/help/matlab/ref/unique.html

Richard <crobar>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by arb (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by crobar (Submitted the item)
  • -email is unavailable- added by crobar
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-08-06 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2019-01-12 jwe Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Item GroupMatlab Compatibility Feature Request
    2018-06-13 rik5 Summaryunique funciton needs &quot;stable&quot; setOrder argument for Matlab compatibility unique function needs "stable" setOrder argument for Matlab compatibility
    2018-06-13 rik5 StatusNone Confirmed
        Release4.4.0 dev
        Summaryunique funciton has different syntax in Matlab (new options) unique funciton needs "stable" setOrder argument for Matlab compatibility
    2018-06-02 crobar Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code