- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am looking for a FORTRAN subroutine or function equivalent to the "unique" functions in MATLAB.
Any help is appreciated.
Any help is appreciated.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There isn't a direct equivalent in Fortran. In Matlab, UNIQUE(A) returns an array of the unique elements in A, in sorted order. I think to implement this in Fortran you'd first have to sort the array, construct a mask that deselects duplicate elements and then does a PACK to select only the unique elements.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page