Use the sort index to change the order of columns in your data.
% Create demo data
rng('default')
data = rand(8376, 35).*randi(100,1,35);
% Compute median of each column
med = median(data);
% Sort the columns of data by descending median order
[~, sortIdx] = sort(med,'descend');
dataDescend = data(:,sortIdx);
% Plot the results
boxplot(dataDescend)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352157/image.png)
If you want to label the orginal column order,
set(gca, 'XTick', 1:numel(med), 'XTickLabel', sortIdx)
xlabel('Original column order')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352160/image.png)