《matlab第二次z变换图过程.docx》由会员分享,可在线阅读,更多相关《matlab第二次z变换图过程.docx(7页珍藏版)》请在第壹文秘上搜索。
1、M文件functionljdt(A,B)p=roots(八);q=roots(B);p=p;q=q;x=max(abs(pq1);x=x+0.1;y=;clfholdonaxis(-xx-yy)w=0:pi/300:2*pi;t=exp(i*w);plot(t)axis(square)plot(-xx,00J)plot(00,-yy)text(.l,x,jlmz)text(y,l10Rez)plot(real(p),imag(p)x)plot(real(q),imag(q),o)title(pole-zerodiagramfordiscretesystem)holdoff2.13a=-0.4-
2、0.7;b=L0.30.2;subplot211ZPlane(b,a);XlabelC实部上ylabel(虚部);num=0.30.2;den=l-0.3-0.7;h=impz(num,den);subplot212Stem(h);XIabel(k);IitIeC单位脉冲响应t);pole-zerodiagramfordiscretesystema=l-0.3-0.7;b=0.30.2;ljdt(a,b)p=roots(a)q=roots(b)pa=abs(p)P=1.OOO-0.7000q=0-0.6667pa=1.OOO-0.70002.12num=2-10;den=2-1-3;x0=0,
3、0;y0=l3;N=8;n=0N-lJ,;x=0.5.n;Zi=filtic(num,den,yO,xO);y,Zf=filter(num,den,x,Zi);plot(n,x,r-,n,y,b-);title(响应);xlabel(n,)jylabel(x(n)-y(n);IegendC输入x:输出yl);grid;响应IIIIIIIIIIIIIIIaIII输入X输WaiiIIIIIIaiiIIIaiiaii/Z_aiiIIIaiiIIIIIIIIIIIIaii/IIIIIIIIIaiiaiiIIIIIIaii/!/:/::Xaii::z:*bj/一;:aaiiIIII123456OO43三
4、Agx2010例a=L-0.5-0.0050.3;b=l121;ljdt(a,b)p=roots(a)q=roots(b)pa=abs(p)P=0.5198+0.5346i0.5198-0.5346i-0.5396q=-I-Ipa=0.74560.74560.53962.14b=L4-l-l;a=l-1-1;figure。)subplot(lJJ)ZPIane(b,a);XlabeIC实部上ylabel(虚部,);num=4-1-l;den=l-1-I;h=impz(num,den);figure(2)w=0:l:500J*pi/500;freqz(b,a,w)0.10.20.30.40.50.60.70.80.91NormalizedFrequency(rad/sample)4208111mp)8p2三6en010.20.30.4050.6070.80.9NormalizedFrequency(rad/sample)Oo4Oooo50503322(Sa26p)3SEd504