a=input('输入数字');
if a==1
s=(9-(-5))*rand(1,10)-5;
s2=sort(s,'descend')
elseif a==2
N=input('序列长度');
s3=normrnd(3,9,1,N);
s4=sort(s3,'descend')
end
%%%%%%%%%%%%%%%%%%%%
输入数字1
s2 =
8.0966 7.8367 7.5111 6.3843 0.7438 0.6799 -0.0598 -2.5323 -4.1895 -4.8619
输入数字2
序列长度10
s4 =
22.6487 12.6009 9.5321 5.9456 4.5718 4.0254 2.6613 1.7724 1.3196 -2.2948