MATLAB: How do i sort cell array

cell arraysort

I was wondering how can I sort a cell array. I have a cell array that contains 'T1-001'to 'T1-058' and 'T2-001 to T2-058' and was wondering if I could sort it so that it can go something like this:
T1-001,T2-001,T1-002, T2-002, etc.

Best Answer

If a is your cell array
b=reshape(a,numel(a)/2,2)'
out=b(:)