您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 管理学资料 > 信号与系统实验傅里叶变换
信号与系统实验10.1利用fourier函数求下列信号的傅里叶变换F(jw),并用ezplot函数绘出其幅度频谱|F(jw)|和相位频谱d(w)。1f1(t)=(sin(2*pi*t)/(2*pi*t))2symstphaseimref=sin(2*pi*t)/(2*pi*t);F=fourier(f);subplot(3,1,1)ezplot(f);title('Ôͼ')axis([-pipi-0.31.1])subplot(3,1,2)ezplot(abs(F))title('·ù¶Èͼ')axis([-3*pi3*pi0.30.6])im=imag(F);re=real(F);phase=atan(im/re);subplot(3,1,3)ezplot(phase)title('Ïàλͼ')axis([-3*pi3*pi-0.50.5])2f2(t)=sin(2*pi*(t-2))/(2*pi*(t-2))symstphaseimref=sin(2*pi*(t-2))/(2*pi*(t-2));F=fourier(f);subplot(3,1,1)ezplot(f);title('Ôͼ')axis([-pi2*pi-0.31.1])subplot(3,1,2)ezplot(abs(F))title('·ù¶ÈÆ×')axis([-3*pi3*pi0.30.6])im=imag(F);re=real(F);phase=atan(im/re);subplot(3,1,3)ezplot(phase)title('ÏàλÆ×')axis([-3*pi3*pi-0.50.5])-3-2-1012300.51t原图-8-6-4-2024680.4w幅度谱-8-6-4-202468-0.500.5x相位谱-3-2-1012345600.51t原图-8-6-4-2024680.4w幅度谱-8-6-4-202468-0.500.5w相位谱10.2试用ifourier函数求下列傅里叶变换的逆变换,并画出其时域波形。1F(iw)=1/2Sa2(w/4);symstwF=8*(sin(w/4))^2/(w^2);f=ifourier(F,t)ezplot(f);axis([-0.80.8-0.21.1]);title('ʱÓò²¨ÐÎ')输出为:f=-(4*fourier(cos(w/2)/w^2,w,-t)+4*pi*t*(2*heaviside(t)-1))/(2*pi)报错:Errorusinginlineeval(line15)Errorininlineexpression==-(4.*fourier(cos(w./2)./w.^2,w,-t)+4.*pi.*t.*(2.*heaviside(t)-1))./(2.*pi)Undefinedfunction'fourier'forinputargumentsoftype'double'.Errorininline/feval(line34)INLINE_OUT_=inlineeval(INLINE_INPUTS_,INLINE_OBJ_.inputExpr,INLINE_OBJ_.expr);Errorinezplotfeval(line54)z=feval(f,x(1),y(1));Errorinezplotezimplicit(line258)u=ezplotfeval(f,X,Y);Errorinezplot(line154)hp=ezimplicit(cax,f{1},vars,labels,args{:});Errorinsym/ezplot(line61)h=ezplot(fhandle(f));ErrorinUntitled(line4)ezplot(f);调试过很多次了,仍然出不来图像。10.3已知信号f(t)的波形如图所示,使用MATLAB傅里叶变换数值算法,解决一以下问题:1求f1(t)的傅里叶变换F1(jw),并绘制出其幅度频谱|F1(jw)|以及相位频谱曲线。2求f2(t)=f(t-2)的傅里叶变换F2(jw)|,并绘制出其幅度频谱|F2(jw)|以及相位频谱曲线。观察分析傅里叶变换的时移特性。(1)dt=0.005;t=-2:dt:2;f=(t/2+1/2).*((t=-1)&(t=1));N=2000;k=0:N;W=2*pi*k/(N*dt);F=f*exp(-1i*t'*W)*dt;phase=angle(F);F=abs(F);subplot(3,1,1);plot(t,f);xlabel('t');ylabel('f(t)');title('f(t)');subplot(3,1,2);plot(W,F);xlabel('\omega');ylabel('\omega');title('f(t)µÄ¸µÀïÒ¶±ä»»F(\omega)');subplot(3,1,3);plot(W,phase);axis([0,200,-5,5]);xlabel('\omega');ylabel('\omega');title('f(t)µÄ¸µÀïÒ¶±ä»»Ïàλ(\omega)');(2)dt=0.005;t=0:dt:4;f=((t-2)/2+1/2).*(((t-2)=-1)&((t-2)=1));N=2000;k=0:N;W=2*pi*k/(N*dt);F=f*exp(-1i*(t+2)'*W)*dt;phase=angle(F);F=abs(F);-2-1.5-1-0.500.511.5200.51tf(t)f(t)0200400600800100012001400012f(t)的傅里叶变换F()020406080100120140160180200-505f(t)的傅里叶变换相位()00.511.522.533.5400.51tf(t)f(t)0200400600800100012001400012f(t)的傅里叶变换F()020406080100120140160180200-505f(t)的傅里叶变换相位()subplot(3,1,1);plot(t,f);xlabel('t');ylabel('f(t)');title('f(t)');subplot(3,1,2);plot(W,F);xlabel('\omega');ylabel('\omega');title('f(t)µÄ¸µÀïÒ¶±ä»»F(\omega)');subplot(3,1,3);plot(W,phase);axis([0,200,-5,5]);xlabel('\omega');ylabel('\omega');title('f(t)µÄ¸µÀïÒ¶±ä»»Ïàλ(\omega)');10.5如图所示电路为二阶低通滤波器。设R=sqrt(L/2C),L=0.4H,C=0.05F,R=2欧,试用matlab编程绘制该系统频率响应H(jw)的幅频响应及相频响应曲线,并求出H(jw)的截止频率。b=[0.1,0];a=[0.02,-0.7,0];[h,w]=freqs(b,a,100);h1=abs(h);h2=angle(h);subplot(2,1,1);plot(w,h1);gridxlabel('½ÇƵÂÊ(\omega)');ylabel('·ù¶È');title('H(j\omega)µÄ·ùƵÌØÐÔ');subplot(2,1,2);plot(w,h2*180/pi);gridxlabel('½ÇƵÂÊ(\omega)');ylabel('Ïà루¶È£©');title('H(j\omega)µÄÏàƵÌØÐÔ');0100200300400500600700800900100000.050.10.150.2角频率()幅度H(j)的幅频特性01002003004005006007008009001000-200-150-100-50角频率()相位(度)H(j)的相频特性
本文标题:信号与系统实验傅里叶变换
链接地址:https://www.777doc.com/doc-2691018 .html