% Generate a 3X4 integer data matrix
A = randi(100,)
% Perform matrix permutation on the matrix
A = A'
% Replace and then sort in row order
A = sort(A,1)
% Finally find the average of each column< /p>
m = mean(A)
The running results are as follows
A =
44 80 45 76
39 19 65 28
77 49 71 68
A =
44 39 77
80 19 49
45 65 71
76 28 68
A =
44 19 49
45 28 68
76 39 71
80 65 77
m =
61.2500 37.7500 66.2500