A = [1 2 4 5 3 6 5 6];
B = {'a', 'b', 'c', 'e', 'f', 'ba', 'bd' , 'bc'};
tab = table(A',B');
% Sort by doubles
Output = sortrows(tab,1)
% Sort by string
Output = sortrows(tab,2)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!