%冒泡算法
function y=bubblesort(x)
r=length(x);
for i=1:r-1
for j=i+1:r
if x(i)>x(j)
temp=x(i);
x(i)=x(j);
x(j)=temp;
end
end
end
y=fliplr(x);
function y=bubblesort(x)
r=length(x);
for i=1:r-1
for j=i+1:r
if x(i)>x(j)
temp=x(i);
x(i)=x(j);
x(j)=temp;
end
end
end
y=fliplr(x);