1、p345subplot(2,2,1)t1=0:0.1:2;y1=sin(2*pi*t1);plot(t1,y1);title(y=sin(2pit) 练习:subplot(2,2,2)t2=0:0.1:2;y2=exp(-t2);exp(-2*t2);exp(-3*t2);plot(t2,y2)axis(0 2 -0.2 1.2);title(y=e-t,y=e-2t,y=e-3t) 练习:subplot(2,2,3);t3=0 1 1 2 2 3 4;y3=0 0 2 2 0 0 0;plot(t3,y3);axis(0 4 -0.5 3);title(脉冲信号) 练习:subplot(2,
2、2,4);t4=0:0.1:2*pi;plot(sin(t4),cos(t4);axis(-1.2 1.2 -1.2 1.2);axis equal;title(圆) 练习:P346x=0:0.1:20;zeta=0y1=1-1/sqrt(1-zeta2)*exp(-zeta*x).*sin(sqrt(1-zeta2)*x+acos(zeta);plot(x,y1)zeta=0.3;y2=1-1/sqrt(1-zeta2)*exp(-zeta*x).*sin(sqrt(1-zeta2)*x+acos(zeta);hold onplot(x,y2,r:)zeta=0.5;y3=1-1/sqrt(
3、1-zeta2)*exp(-zeta*x).*sin(sqrt(1-zeta2)*x+acos(zeta);plot(x,y3,g*)zeta=0.707;y4=1-1/sqrt(1-zeta2)*exp(-zeta*x).*sin(sqrt(1-zeta2)*x+acos(zeta);plot(x,y4,m-)title(二阶系统曲线)legend(zeta=0,zeta=0.3,zeta=0.5,zeta=0.707)grid ongtext(zeta=0)gtext(zeta=0.3)gtext(zeta=0.5)gtext(zeta=0.707)ginput(3) zeta = 0an
4、s = 2.6037 0.9035 13.1106 2.0029 4.2166 1.0380 P347h_fig=gcfh_axis=gcah_line1=gcoh_title=get(gca,title)h_text2=findobj(h_fig,string,zeta=0.3) h_fig = 1h_axis = 151.0018h_line1 = 1h_title = 152.0018h_text2 = Empty matrix: 0-by-1 set(h_line1,linewidth,5)set(h_axis,xgrid,off)set(gca,ytick,0 0.25 0.5 1.
5、0 1.25 1.5 1.75 2.0)set(h_title,color,red,fontsize,13)set(h_text2,color,red) ? Undefined function or variable h_axis. P349x=0:0.1:20;y1=1-1/sqrt(1-zeta2)*exp(-zeta*x).*sin(sqrt(1-zeta2)*x+acos(zeta);y2=1-1/sqrt(1-zeta2)*exp(-zeta*x).*sin(sqrt(1-zeta2)*x+acos(zeta);y3=1-1/sqrt(1-zeta2)*exp(-zeta*x).*
6、sin(sqrt(1-zeta2)*x+acos(zeta);y4=1-1/sqrt(1-zeta2)*exp(-zeta*x).*sin(sqrt(1-zeta2)*x+acos(zeta);y=y1;y2;y3;y4;z=ones(size(x)*0;ones(size(x)*0.3;ones(size(x)*0.5;ones(size(x)*0.707;plot(x,x,x,x)surf(x,x,x,x) ? Input argument n is undefined.Error in = zeta at 12 Z = double(zeta(sym(n),sym(X); P350x=0:0.3:2*pi;y=sin(x);subplot(2,2,1)bar(x,y,0.5)axis(0,2*pi,-1.2,1.2)subplot(2,2,2)fill(x,y,r)subplot(2,2,3)stairs(x,y)subplot(2,2,4)stem(x,y) P350 guide