6.第六题程序: subplot(2,2,1) x=linspace(-5,5,30); y=exp(-x.^2); plot(x,y); title('概率曲线') subplot(2,2,2) t=linspace(0,2*pi,60); y=sin(2*t); polar(t,y); title('四叶玫瑰线') subplot(2,2,3) t=linspace(-5,5,20); x=3*t./(1+t.^3); y=3*(t.^2)./(1+t.^3); plot(x,y); title('叶形线') subplot(2,2,4) i=-0.9:0.2:1; j1=log((1+sqrt(1-i.^2))./i)-(sqrt(1-i.^2)); j2=log((1-sqrt(1-i.^2))./i)+(sqrt(1-i.^2)); subplot(2,2,4),plot(i,j1,i,j2),title('曳物线'); 第六题运行结果: 7.第七题程序: x=-8:0.1:8; y=x; [X,Y]=meshgrid(x,y); Z=sin(pi*sqrt(X.^2+Y.^2)); mesh(X,Y,Z); 第七题运行结果: 8.第八题程序: for i=100:1:999 s=fix((i/100))^3+fix((mod(i,100)/10))^3+fix(mod(i,10))^3; if i==s s end end 第八题运行结果: s = 153 s = 370 s = 371 s = 407 9.第九题程序: e=1; for i=1:1:100 e=e+1/factorial(i); end e OL=0; n=1000000; for i=1:1:n OL=OL+1/i; end OL=OL-log(n) vpa('pi^2/6',7) YZL=0; for i=1:1:10000 digits(7) YZL=YZL+1./(i^2); end