Does the "unique" function work with 64 bit integers?
Ältere Kommentare anzeigen
I was trying to sort a set of 64 bit integers using the "unique" function. This function seems to convert them to a 64 bit integer before sorting, though.
Example:
x=uint64(2^63)+uint64(0:1024)';
y=unique(x);
The output, y, is a single number, 9223372036854775808, rather than a column of 1025 integers, since the last 11 bits are rounded off.
The "sort" sorts the data properly, but does not remove duplicates. Are there any other solutions? I am using Matlab R2012a.
1 Kommentar
James Tursa
am 24 Aug. 2016
In R2015a, y is a column of 1025 integers.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!