I want to see whether a column X
in a table T
is in sorted order. class(x)
is double
. I compare X
to sort(x)
using isequal
and find that the answer is false.
I visually inspect, and find no entries that differ. Further, by making a table [T.x sort(T.x)]
, I see that the first 2011 entries are equal to each other. The 2012th row is some how not equal, using the isequal
function. Here is a dput of this row
ans =
reshape([2080857.000000 2080857.000000 ],[1 2])
Converting to int64 also does not give equality.
This is not the same as the linked duplicate question. I have tried techniques from there, including format long g
and my values are still the same. In addition, the two columns of the table are the 'same', one is just the sorted ordering of the other, and to isequal
, the first 2011 entries are equal and the 2012th entry is equal to my naked eye, or converted to integer.