# MATLAB: Sorted two different arrays

sort

hello, I have two different variables one of them is table, one of them is cell with the same number of rows. I need to sort both of them with table 1st column how can ı do that?

• [~,idx]=sort(T{:,1}); % T your tableC(idx,:) % C your cell become sorted according to first column of tableT(idx,:) % T becomes sorted according to first column of its own