MATLAB: Sorting a Cell Array

arraysort

Hi,
Sorry if this has been asked / answered many times or very simple etc. etc!
If I have a cell array say Array = {B C A;1 3 2; D E F}
Is it possible to sort the first row in order, so its A B C, with the second and third rows changing corresponding to to this initial sort?
Final answer being {A B C;2 1 3;F D E}
Thanks in advance Matthew

Best Answer

Array = {'B' 'C' 'A';1 3 2; 'D' 'E' 'F'}
out = sortrows(Array',1)';
OR
[id id] = sort(Array(1,:))
out = Array(:,id)