信号与系统实验教程(只有答案)

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.m

function y=x2(t) y1=1;y2=1;

y=y1.*(-0.2

Q2_6.m

clear,close all

T = 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 signal end

w0 = 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; 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(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 all

T = 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 signal end

w0 = 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; 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;

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. 连续时间非周期信号的傅里叶变换

给定两个时限信号:

?2?t??1?t?2,??x1(t)??1,?1?t?1 x2(t)?cos(t)[u(t?1)?u(t?1)]

2??t?2,1?t?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&t<1)+y3.*(1<=t&t<2);

手工绘制的x1(t)的时域波形图 手工绘制的x2(t)的时域波形图

联系客服:779662525#qq.com(#替换为@)