function a_ed = arraysort(a)
%冒泡排序法
for i =1:length(a)-1
%进行多少次比较
for j=1+i:length(a)
%每次求出最大的数,放在最后
if(a(j)<a(i))
tem = a(i);
a(i) = a(j);
a(j) = tem;
end
end
a_ed = a;
end
clc;
clear;
a = [2 4 4 6 14 0 2 8 4 1 9 4]
b = arraysort(a)