There are 9 empty cells in ‘RankList’ and they were causing the problem.
Try this —
LD = load('matlab_RankList.mat')
RankList = LD.RankList
idx = cellfun(@(x)~isempty(x), RankList); % Logical Vector
Empty_Cells = nnz(~idx)
RankListFull = RankList(idx) % Non-Empty Entries
RankListUnique = unique(RankListFull) % Unique Entries (Sorted)
RankListUnique = unique(RankListFull, 'stable') % Unique Entries (Un-sorted)
.