信号与系统实验教程(只有答案).doc_第1页
信号与系统实验教程(只有答案).doc_第2页
信号与系统实验教程(只有答案).doc_第3页
信号与系统实验教程(只有答案).doc_第4页
信号与系统实验教程(只有答案).doc_第5页
已阅读5页,还剩51页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

信 号 与 系 统实 验 教 程(只有答案)(实验报告)这么玩!目录实验一 信号与系统的时域分析2三、实验内容及步骤2实验二 连续时间信号的频域分析14三、实验内容及步骤14实验三 连续时间LTI系统的频域分析35三、实验内容及步骤35实验四 通信系统仿真41三、实验内容及步骤41实验五 连续时间LTI系统的复频域分析51三、实验内容及步骤51实验一 信号与系统的时域分析三、实验内容及步骤实验前,必须首先阅读本实验原理,读懂所给出的全部范例程序。实验开始时,先在计算机上运行这些范例程序,观察所得到的信号的波形图。并结合范例程序应该完成的工作,进一步分析程序中各个语句的作用,从而真正理解这些程序。实验前,一定要针对下面的实验项目做好相应的实验准备工作,包括事先编写好相应的实验程序等事项。Q1-1:修改程序Program1_1,将dt改为0.2,再执行该程序,保存图形,看看所得图形的效果如何? dt = 0.01时的信号波形 dt = 0.2时的信号波形 这两幅图形有什么区别,哪一幅图形看起来与实际信号波形更像?答:Q1-2:修改程序Program1_1,并以Q1_2为文件名存盘,产生实指数信号x(t)=e-0.5t。 要求在图形中加上网格线,并使用函数axis()控制图形的时间范围在02秒之间。然后执行该程序,保存所的图形。修改Program1_1后得到的程序Q1_2如下: 信号x(t)=e-0.5t的波形图clear, % Clear all variablesclose all, % Close all figure windowsdt = 0.2; % Specify the step of time variablet = -2:dt:2; % Specify the interval of timex = exp(-0.5*t); % Generate the signalplot(t,x) grid on;axis (0 2 0 1 ) title(Sinusoidal signal x(t)xlabel(Time t (sec)Q1-3:修改程序Program1_1,并以Q1_3为文件名存盘,使之能够仿真从键盘上任意输入的一个连续时间信号,并利用该程序仿真信号x(t)=e-2t。修改Program1_1后得到的程序Q1_3如下: 信号x(t)=e-2t的波形图clear, close all, dt = 0.2; t = -2:dt:2; x=input(Input x(t):);plot(t,x) grid on;axis (0 2 -1 1 ) title(Sinusoidal signal x(t)xlabel(Time t (sec) Q1-4:将实验原理中所给的单位冲激信号和单位阶跃信号的函数文件在MATLAB文件编辑器中编写好,并分别以文件名delta和u存入work文件夹中以便于使用。抄写函数文件delta如下: 抄写函数文件u如下:function y = delta(t) % Unit step functiondt = 0.01; function y = u(t)y = (u(t)-u(t-dt)/dt; y = (t=0); % y = 1 for t 0, else y = 0Q1-5:修改程序Program1_4,并以Q1_5为文件名存盘,利用axis()函数,将图形窗口的横坐标范围改为-2n5,纵坐标范围改为-1.5 x 1.5。修改Program1_4后得到的程序Q1_5如下: 信号的波形图 clear, close all, n = -5:5; x = zeros(1,4), 0.1, 1.1, -1.2, 0, 1.3, zeros(1,2); stem (n,x,.) grid on,axis(-2 5 -1.5 1.5);title (A discrete-time sequence xn)xlabel (Time index n)Q1-6:仿照前面的示例程序的编写方法,编写一个MATLAB程序,以Q1_6为文件名存盘,使之能够在同一个图形窗口中的两个子图中分别绘制信号xn=0.5|n| 和x(t)=cos(2t)u(t)-u(t-3)。要求选择的时间窗能够表现出信号的主要部分(或特征)。编写的程序Q1_6如下: 信号xn=0.5|n| 的波形图和信号x(t)=cos(2t)u(t)-u(t-3)的波形图clear,close all,t = -1:0.01:4;xt = cos(2*pi*t).*(u(t)-u(t-3); n=-5:5; xn=(0.5).abs(n); subplot(211)plot(t,xt) grid on,title (Original signal x(t)subplot(212)stem(n,xn,.) grid on,title (Original signal x(n)xlabel (Time t (sec)Q1-7:根据示例程序的编程方法,编写一个MATLAB程序,以Q1_7为文件名存盘,由给定信号x(t) = e-0.5tu(t) 求信号y(t) = x(1.5t+3),并绘制出x(t) 和y(t)的图形。编写的程序Q1_7如下:编写产生x(t)的函数文件x.mfunction y=x(t)y=exp(-0.5*t).*u(t);clear,close all,t = -3:0.01:4;xt = x(t); % Generate the original signal x(t)yt=x(1.5*t+3); subplot(211)plot(t,xt) % Plot x(t)grid on,title (Original signal x(t)subplot(212)plot(t,yt) % Plot x(t)grid on,title (Original signal y(t)xlabel (Time t (sec) 信号x(t)的波形图 信号y(t) = x(1.5t+3) 的波形图Q1-8:给定一个离散时间信号xn = un un-8,仿照示例程序Program1_5,编写程序Q1_8,产生xn的左移序列x1n = xn+6和右移序列x2n = xn-6,并在同一个图形窗口的三个子图中分别绘制这三个序列的图形。编写的程序Q1_8如下:编写产生x(t)的函数文件xx.mfunction y=xx(n)y=u(n)-u(n-8);clear,close all,n = -10:15;x =xx(n); % Generate the original signal x(n)x1 = xx(n+6); % Shift x(t) to the left by 2 second to get x1(n+6)x2 =xx(n-6); % Shift x(t) to the right by 2 second to get x2(n-6)subplot(311)stem(n,x,.) % Plot x(t)grid on,title (Original signal x(n)subplot (312)stem (n,x1,.) % Plot x1(t)grid on,title (Left shifted version of x(n)subplot (313)stem (n,x2,.) % Plot x2(t)grid on,title (Right shifted version of x(n)xlabel (Time t (sec)信号波形图Q1-9:编写程序Q1_9,使之能够接受以键盘方式输入的定义在不同时间段的两个不同连续时间信号并完成卷积运算,分别绘制这两个信号及其卷积的结果的图形,图形按照22分割成四个子图。编写的程序Q1_9如下:clear;close all;dt = 0.01;t0=input(Input first signal t0:);t1=input(Input first first signal t1:);tx = t0:dt:t1;x = input(Input first signal variable(tx) :);t2=input(Input second signal t0:);t3=input(Input second signal t1:);th=t2:dt:t3;h = input(Input second signal variable(th) :)y = dt*conv(x,h); % Compute the convolution of x(t) and h(t)subplot(221)plot(tx,x), grid on, title(Signal x(t)xlabel(Time t sec)subplot(222)plot(th,h), grid on, title(Signal h(t)xlabel(Time t sec)subplot(313)plot(y), grid on, title(The convolution of x(t) and h(t) xlabel(Time t sec)信号x (t)、h(t)和x (t)*h(t)的波形图Q1-10:给定两个离散时间序列 xn = 0.5nun-un-8 hn = un-un-8编写程序Q1_10,计算它们的卷积,并分别绘制xn、hn和它们的卷积yn的图形。编写的程序Q1_10如下:n=0:10;x = (0.5).n.*(u(n)-u(n-8);h = u(n)-u(n-8);y =conv(x,h); % Compute the convolution of x(t) and h(t)subplot(221)stem(n,x,.), grid on, title(Signal x(n)subplot(222)stem(n,h,.), grid on, title(Signal h(n)subplot(212)stem(y), grid on, title(The convolution of x(n) and h(n), xlabel(Time t sec);信号xn、hn和yn的波形图Q1-11已知一个序列为 编写MATLAB程序Q1_11,能够将xn以N = 8为周期进行周期延拓得到一个周期为N =8的周期序列yn,并分别绘制xn和yn图形。编写的程序Q1_11如下:U4.mfunction y=u4(n)y=n.*(u(n)-u(n-5);Q111.mclear, close all;n =-16:32x=u4(n);T = 8; y = 0;for k = -2:4; y =y+u4(n-k*T);endsubplot(211)stem(n,x,.);grid on,title (Original signal x(n)xlabel(Time t sec)subplot(212)stem(n,y);title (period signal x(n)xlabel(Time t sec)grid on,信号xn的波形图 信号yn的波形图Q1-12 仿照范例程序Program1_7,编写程序Q1_12,计算并绘制由如下微分方程表示的系统在输入信号为x(t) = (e-2t - e-3t)u(t)时的零状态响应和你手工计算得到的系统零状态响应曲线。 手工计算得到的系统零状态响应的数学表达式是:编写的程序Q1_12如下: 用MATLAB绘制的手工计算的系统响应clear, close all;num = input(Type in the right coefficient vector of differential equation:);den = input(Type in the left coefficient vector of differential equation:);t = 0:0.01:8;x = input(Type in the expression of the input signal x(t):);y=lsim(num,den,x,t);plot(t,y)执行程序Q1_12得到的系统响应Q1-13:利用程序Q1_9,验证卷积的相关性质。(a) 验证性质:选择信号x(t)的数学表达式为:sin(t)x(t)、(t)和x(t)*(t)的波形验证所得结论是:(b) 验证性质:选择信号x(t)的数学表达式为:sin(t) t0=2x(t)、(t-t0) 和的波形验证所得结论是:(c) 验证性质:选择信号x(t)的数学表达式为: sin(t) 选择的t1 = 2 秒,t2 = 3 秒。执行程序Q1_9,输入信号x(t-t1) 和(t-t2) 的数学表达式,得到的信号及其卷积的波形图如下:执行程序Q1_9,输入信号x(t-t2) 和(t-t1) 的数学表达式,得到的信号及其卷积的波形图如下:验证所得结论是:(d) 验证性质:选择信号x(t)(建议选择一个时限信号)的数学表达式为:u(t)-u(t-3)的数学表达式为:手工绘制的波形如下:执行程序Q1_9,输入信号x(t) 和u(t) 的数学表达式,得到的信号及其卷积的波形图如下:验证所得结论是:(e) 验证性质:选择信号x(t)的数学表达式为: sin(t) 选择信号h(t)的数学表达式为:sin(t)选择的t0=:1执行程序Q1_9,输入信号x(t) 和h(t-t0) 的数学表达式,得到的信号及其卷积的波形图如下:执行程序Q1_9,输入信号x(t-t0) 和h(t) 的数学表达式,得到的信号及其卷积的波形图如下:验证所得结论是:Q1-14:做如下总结:1、信号与系统分析,就是基于信号的分解,在时域中,信号主要分解成:2、写出卷积的运算步骤,并谈谈你对卷积的一些基本性质的理解。利用MATLAB计算卷积的函数是什么?如何使用?3、在时域中,描述一个连续时间LTI系统的数学模型有:4、MATLAB是如何表示一个由微分方程描述的连续时间LTI系统的?求解连续时间LTI系统的单位冲激响应、单位阶跃响应以及系统在某一个输入信号作用下的零状态响应的MATLAB函数有哪些?四、实验报告要求1、按要求完整书写你所编写的全部MATLAB程序2、详细记录实验过程中的有关信号波形图(存于自带的U盘中),图形要有明确的标题。全部的MATLAB图形应该用打印机打印,然后贴在本实验报告中的相应位置,禁止复印件。3、实事求是地回答相关问题,严禁抄袭。本实验完成时间: 年 月 日实验二 连续时间信号的频域分析三、实验内容及步骤实验前,必须首先阅读本实验原理,读懂所给出的全部范例程序。实验开始时,先在计算机上运行这些范例程序,观察所得到的信号的波形图。并结合范例程序应该完成的工作,进一步分析程序中各个语句的作用,从而真正理解这些程序。实验前,一定要针对下面的实验项目做好相应的实验准备工作,包括事先编写好相应的实验程序等事项。Q2-1 编写程序Q2_1,绘制下面的信号的波形图: 其中,w0 = 0.5,要求将一个图形窗口分割成四个子图,分别绘制cos(w0t)、cos(3w0t)、cos(5w0t) 和x(t) 的波形图,给图形加title,网格线和x坐标标签,并且程序能够接受从键盘输入的和式中的项数。抄写程序Q2_1如下:clear,close allT = 2; dt = 0.00001; t = -2*pi:dt:2*pi; w0=0.5*pi;x1 = cos(w0*t);x3=(-1/3)*cos(3*w0*t);x5=(1/5)*cos(5*w0*t);N = input(Type in the number of the harmonic components N = :);y=0;for q = 1:N; % Synthesiz the periodic signal y(t) from the finite Fourier series y = y+(1/q).*sin(q*pi)/2).*cos(q*w0*t);end;subplot(221),plot(t,x1), title(The original signal cos(w0t);grid on; axis(-2*pi,2*pi,-1,1), xlabel(Time t)subplot(223), plot(t,x5), title(The original signal (1/5)cos(5w0t);grid on; axis(-2*pi,2*pi,-1,1), xlabel(Time t)subplot(222)plot(t,x3), title(The original signal (-1/3)cos(3w0t);grid on; axis(-2*pi,2*pi,-1,1), xlabel(Time t)subplot(224)plot(t,y), title(The synthesis signal of x(t);grid on; axis(-10,10,-1,1), xlabel(Index N)执行程序Q2_1所得到的图形如下:N=10Q2-2 给程序Program2_1增加适当的语句,并以Q2_2存盘,使之能够计算例题2-1中的周期方波信号的傅里叶级数的系数,并绘制出信号的幅度谱和相位谱的谱线图。通过增加适当的语句修改Program2_1而成的程序Q2_2抄写如下:clear,close allT = 2; dt = 0.00001; t = -2:dt:2;x1 = u(t)-u(t-1-dt); x = 0;for m = -1:1 x = x + u(t-m*T) - u(t-1-m*T-dt); % Periodically extend x1(t) to form a periodic signalendw0 = 2*pi/T;N = input(Type in the number of the harmonic components N = :);L = 2*N+1;for k = -N:1:N; ak(N+1+k) = (1/T)*x1*exp(-j*k*w0*t)*dt;endphi = angle(ak);y=0;for q = 1:L; % Synthesiz the periodic signal y(t) from the finite Fourier series y = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;subplot(221)plot(t,x), title(The original signal x(t), axis(-2,2,-0.2,1.2),grid on;subplot(222)k=-N:N; stem(ak), title(The ak of x(t), axis(-1,1,-0.4,0.4),grid on;subplot(223)k=-N:N; stem(k,abs(ak),k.), title(The amplitude |ak| of x(t), axis(-N,N,-0.1,0.6),grid on;subplot(224)stem(k,phi,r.), title(The phase phi(k) of x(t), axis(-N,N,-2,2), xlabel(Index k),grid on;执行程序Q2_2得到的图形Q2-3 反复执行程序Program2_2,每次执行该程序时,输入不同的N值,并观察所合成的周期方波信号。通过观察,你了解的吉伯斯现象的特点是: N=5 N=10N=20 N=401、周期信号的傅里叶级数与GIBBS现象给定如下两个周期信号:Q2-4 分别手工计算x1(t) 和x2(t) 的傅里叶级数的系数。信号x1(t) 在其主周期内的数学表达式为:t+1 -1t01-t 0t1计算x1(t) 的傅里叶级数的系数的计算过程如下:k = -10:10;ak=0; ak = 1/2.* (sin(k)*pi/2)./(k)*pi/2)N=-10:10; stem(k,ak);通过计算得到的x1(t)的傅里叶级数的系数的数学表达式是:1/2.* (sin(k)*pi/2)./(k)*pi/2)信号x2(t) 在其主周期内的数学表达式为: 1 |t|0.2 0 0.2|t|1计算x2(t) 的傅里叶级数的系数的计算过程如下:k = -10:10;ak=0; ak =sin(k*pi*0.2)./(k*pi)N=-10:10; stem(k,ak);通过计算得到的x1(t)的傅里叶级数的系数的数学表达式是:sin(k*pi*0.2)./(k*pi)用MATLAB帮助你计算出你手工计算的傅里叶级数的系数ak从-10到10共21个系数。从命令窗口上抄写x1(t)的21个系数如下:ak = Columns 1 through 8 0.0000 0.0354 -0.0000 -0.0455 0.0000 0.0637 -0.0000 -0.1061 Columns 9 through 16 0.0000 0.3183 NaN 0.3183 0.0000 -0.1061 -0.0000 0.0637 Columns 17 through 21 0.0000 -0.0455 -0.0000 0.0354 0.0000从命令窗口上抄写x2(t)的21个系数如下:Columns 1 through 8 -0.0000 -0.0208 -0.0378 -0.0432 -0.0312 0.0000 0.0468 0.1009 Columns 9 through 16 0.1514 0.1871 NaN 0.1871 0.1514 0.1009 0.0468 0.0000 Columns 17 through 21 -0.0312 -0.0432 -0.0378 -0.0208 -0.0000Q2-5 仿照程序Program2_1,编写程序Q2_5,以计算x1(t)的傅里叶级数的系数。程序Q2_5如下:编写函数x1.mfunction y=x1(t)y1=t+1;y2=1-t;y=y1.*(-1t&t=0)+y2.*(0t&t1);Q2_5.mclear,close allT = 2; dt = 0.00001; t = -8:dt:8;x11 = x1(t); x = 0;for m = -8:8 x = x + x1(t-m*T); % Periodically extend x1(t) to form a periodic signalendw0 = 2*pi/T;N = 10;L = 2*N+1;for k = -N:1:N; ak(N+1+k) = (1/T)*x11*exp(-j*k*w0*t)*dt;endphi = angle(ak);y=0;for q = 1:L; % Synthesiz the periodic signal y(t) from the finite Fourier series y = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;subplot(211),plot(t,x), title(The original signal x(t), axis(-8,8,-0.2,1.2),grid on,subplot(212)k=-N:N; stem(k,ak,k.), title(The factor ak of x(t), axis(-N,N,-0.1,0.6),grid on,执行程序Q2_5所得到的x1(t)的傅里叶级数的ak从-10到10共21个系数如下:Columns 1 through 5 0.0000 + 0.0000i 0.0025 + 0.0000i 0.0000 + 0.0000i 0.0041 - 0.0000i 0.0000 - 0.0000i Columns 6 through 10 0.0081 + 0.0000i -0.0000 - 0.0000i 0.0225 - 0.0000i -0.0000 - 0.0000i 0.2026 + 0.0000i Columns 11 through 15 0.5000 0.2026 - 0.0000i -0.0000 + 0.0000i 0.0225 + 0.0000i -0.0000 + 0.0000i Columns 16 through 20 0.0081 - 0.0000i 0.0000 + 0.0000i 0.0041 + 0.0000i 0.0000 - 0.0000i 0.0025 - 0.0000i Column 21 0.0000 - 0.0000i与你手工计算的ak相比较,是否相同,如有不同,是何原因造成的?答:Q2-6 仿照程序Program2_1,编写程序Q2_6,以计算x2(t) 的傅里叶级数的系数(不绘图)。程序Q2_6如下:编写函数x2.mfunction y=x2(t)y1=1;y2=1;y=y1.*(-0.2t&t=0)+y2.*(0t&t=0.2);Q2_6.mclear,close allT = 2; dt = 0.00001; t = -8:dt:8;x11 = x2(t); x = 0;for m = -8:8 x = x + x2(t-m*T); % Periodically extend x1(t) to form a periodic signalendw0 = 2*pi/T;N = 10;L = 2*N+1;for k = -N:1:N; ak(N+1+k) = (1/T)*x11*exp(-j*k*w0*t)*dt;endphi = angle(ak);y=0;for q = 1:L; % Synthesiz the periodic signal y(t) from the finite Fourier series y = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;subplot(211),plot(t,x), title(The original signal x(t), axis(-8,8,-0.2,1.2),grid on,subplot(212)k=-N:N; stem(k,ak,k.), title(The factor ak of x(t), axis(-N,N,-0.1,0.6),grid on,执行程序Q2_6所得到的x2(t)的傅里叶级数的ak从-10到10共21个系数如下:Columns 1 through 5 0.0000 - 0.0000i -0.0208 + 0.0000i -0.0378 - 0.0000i -0.0432 + 0.0000i -0.0312 + 0.0000i Columns 6 through 10 -0.0000 + 0.0000i 0.0468 + 0.0000i 0.1009 + 0.0000i 0.1514 - 0.0000i 0.1871 + 0.0000i Columns 11 through 15 0.2000 0.1871 - 0.0000i 0.1514 + 0.0000i 0.1009 - 0.0000i 0.0468 - 0.0000i Columns 16 through 20 -0.0000 - 0.0000i -0.0312 - 0.0000i -0.0432 - 0.0000i -0.0378 + 0.0000i -0.0208 - 0.0000i Column 21 0.0000 + 0.0000i与你手工计算的ak相比较,是否相同,如有不同,是何原因造成的?答:Q2-7 仿照程序Program2_2,编写程序Q2_7,计算并绘制出原始信号x1(t) 的波形图,用有限项级数合成的y1(t) 的波形图,以及x1(t) 的幅度频谱和相位频谱的谱线图。编写程序Q2_7如下:clear,close allT = 2; dt = 0.00001; t = -8:dt:8;x11 = x1(t); x = 0;for m = -8:8 x = x + x1(t-m*T); % Periodically extend x1(t) to form a periodic signalendw0 = 2*pi/T;N = 5;L = 2*N+1;for k = -N:1:N; ak(N+1+k) = (1/T)*x11*exp(-j*k*w0*t)*dt;endphi = angle(ak);y=0;for q = 1:L; % Synthesiz the periodic signal y(t) from the finite Fourier series y = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;phi = angle(ak);y=0;for q = 1:L; % Synthesiz the periodic signal y(t) from the finite Fourier series y = y+ak(q)*exp(j*(-(L-1)/2+q-1)*2*pi*t/T);end;subplot(221),plot(t,x), title(The original signal x(t), axis(-8,8,-0.2,1.2),subplot(223), plot(t,y), title(The synthesis signal y(t), axis(-8,8,-0.2,1.2), xlabel(Time t),subplot(222)k=-N:N; stem(k,abs(ak),k.), title(The amplitude |ak| of x(t), axis(-N,N,-0.1,0.6)subplot(224)stem(k,phi,r.), title(The phase phi(k) of x(t), axis(-N,N,-2,2), xlabel(Index k)执行程序Q2_7,输入N = 5所得到的图形如下:反复执行程序Q2_7,输入不同的N值,观察合成的信号波形中,是否会产生Gibbs现象?为什么?; 答:2. 连续时间非周期信号的傅里叶变换给定两个时限信号: Q2-8 利用单位阶跃信号u(t),将x1(t) 表示成一个数学闭式表达式,并手工绘制x1(t) 和x2(t) 的时域波形图。信号x1(t) 的闭式数学表达式为:x1(t) = :y1=t+2;y2=1;y3=-t+2;y=y1.*(-2=t&t-1)+y2.*(-1=t&t1)+y3.*(1=t&t2);手工绘制的x1(t)的时域波形图 手工绘制的x2(t)的时域波形图function y=x28(t)y1=t+2;y2=1;y3=-t+2;y=y1.*(-2=t&t-1)+y2.*(-1=t&t1)+y3.*(1=t&t2);clear,close allT = 2; dt = 0.00001; t = -5:dt:5;x1 = x28(t).*(u(t+2)-u(t-2); x2=cos(pi/2*t).*(u(t+1)-u(t-1);subplot(211),plot(t,x1,.),title(The original signal x1(t), axis(-5,5,-1,1), xlabel(Time t)subplot(212),plot(t,x2,.),title(The original signal x2(t),axis(-5,5,-1,1), xlabel(Time t)Q2-9手工计算x1(t) 和x2(t) 的傅里叶变换(如能够用傅里叶变换的性质计算最好),并手工绘制出它们的幅度谱和相位谱;计算x1(t) 的傅里叶变换的过程:计算得到的x1(t) 的傅里叶变换的数学表达式为:clear,close allT = 0.01; dw = 0.1; %时间和频率变化的步长t = -10:T:10;w = -4*pi:dw:4*pi;xx=x28(t);X=x28(t)*exp(-j*t*w)*T; %傅里叶变换X1=abs(X); %计算幅度谱phai=angle(X); %计算相位谱subplot(221);plot(t,xx),title(The original signal x1(t),axis(-10,10,-1,2),xlabel(Time t),grid on;subplot(222)plot(w,X),title(The Fourier Transform of x1(t) ),axis(-4*pi,4*pi,-1,3.5),xlabel(f(jw),grid on;subplot(223);plot(w,X1), title(The amplitude of f(jw) ), axis(-4*pi,4*pi,-1,3.5),xlabel(f(jw),grid on;subplot(224);plot(w,phai),title(The phase of f(jw),axis(-pi,pi,-4,4),xlabel(f(jw),grid on;计算x2(t) 的傅里叶变换的过程:clear,close allT = 0.01; dw = 0.1; %时间和频率变化的步长t = -10:T:10;w = -4*pi:dw:4*pi;xx=cos(pi/2*t).*(u(t+1)-u(t-1);X=xx*exp(-j*t*w)*T; %傅里叶变换X1=abs(X); %计算幅度谱phai=angle(X); %计算相位谱subplot(221);plot(t,xx),title(The original signal x1(t),axis(-10,10,-1,2),xlabel(Time t),grid on;subplot(222)plot(w,X),title(The Fourier Transform of x1(t) ),axis(-4*pi,4*pi,-1,3.5),xlabel(f(jw),grid on;subplot(223

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论