当前位置:文档之家› MAtlab 傅里叶变换 实验报告

MAtlab 傅里叶变换 实验报告

MAtlab 傅里叶变换 实验报告
MAtlab 傅里叶变换 实验报告

陕西科技大学实验报告

班级信工142 学号22 姓名何岩实验组别实验日期__________ 室温_____________ 报告日期________________ 成绩报告内容:(目的和要求,原理,步骤,数据,计算,小结等)

1.求信号的离散时间傅立叶变换并分析其周期性和对称性;

给定正弦信号x(t)=2*cos(2*pi*10*t),fs=100HZ, 求其DTFT (a)代码:

f=10;T=1/f;w=-10:0.2:10;

t1=0:0.0001:1;t2=0:0.01:1;

n1=-2; n2=8; n0=0; n=n 1:0.01: n2;

x5=[ n>=0.01];

x1=2*cos(2*f*pi*t1);

x2=2*cos(2*f*pi*t2);

x3=(exp(-j)4(t2'*w));

x4=x2*x3;

subplot(2,2,1);plot(t1,x1);

axis([0 1 1.1*mi n(x2) 1.1*max(x2)]);

xlabel('x( n)');ylabel('x( n)');

title('原信号x1');

xlabel('t');ylabel('x1');

subplot(2,2,3);stem(t2,x2);

axis([0 1 1.1*mi n(x2) 1.1*max(x2)]);

title(' 原信号采样结果x2');

xlabel('t');ylabel('x2');

subplot(2,2,2);stem( n, x5);

axis([0 1 1.1*mi n(x5) 1.1*max(x5)]);

xlabel(' n');ylabel('x2');

title(' 采样函数x2');

subplot(2,2,4);stem(t2,x4);

axis([0 1 -0.2+1.1*mi n(x4) 1.1*max(x4)]);

xlabel('t');ylabel('x4');

title('DTFT 结果x4');

(b)结果:

2.用以下两个有限长序列来验证 DTFT 勺线性、卷积和共轭特性; x1( n)=[1 2 3 4 5 6 7 8 9 10 11 12];x2( n)=R 10

( n)

⑴线性:(a )代码: w=li nspace(-8,8,10000); nx 仁[0:11]; nx2=[0:9];

x1=[1 2 3 4 5 6 7 8 9 10 11 12]; x2=[1 1 1 1 1 1 1 1 1 1];

x3=[x2,zeros(1,(le ngth(x1)-le ngth(x2)))]; x4=2*x1+3*x3;

X1=x1*exp(-j* nx1'*w);% 频率特性 X3=x3*exp(-j* nx1'*w);% 频率特性 X4=x4*exp(-j* nx1'*w);% 频率特性

subplot(5,3,1),stem( nx1,x1),axis([-1,13,0,15]);title('x1').

原信号疋

1

0 0.5 t

采样函数垃

原信号采样结果Q

DTFT 结果超

ylabel('x (n)');

subplot(5,3,2),stem( nx2,x2),axis([-1,13,0,5]);title('x2');

subplot(5,3,3),stem( nx1,x4),axis([-1,13,0,26]);title('x4=2*x1+3*x 3');

subplot(5,3,4),plot(w,abs(X1)); ylabel(' 幅度')

subplot(5,3,7),plot(w,a ngle(X1));ylabel(' 相位')

subplot(5,3,10),plot(w,real(X1));ylabel(' 实部')

subplot(5,3,13),plot(w,imag(X1)); ylabel(' 虚部') subplot(5,3,5),plot(w,abs(X3)); subplot(5,3,8),plot(w,a ngle(X3)); subplot(5,3,11),plot(w,real(X3)); subplot(5,3,14),plot(w,imag(X3)); subplot(5,3,6),plot(w,abs(X4));

subplot(5,3,9),plot(w,a ngle(X4));

subplot(5,3,12),plot(w,real(X4)); subplot(5,3,15),plot(w,imag(X4));

(b)结果:

⑵卷积:(a )代码:

nx1= 0:11; nx2=0:9; nx3=0:20; w=li nspace(-8,8,40); %w=[-8 ,8]分 10000 份

x1=[1 2 3 4 5 6 7 8 9 10 11 12]; x2=[1 1 1 1 1 1 1 1 1 1]; x3=conv(x1,x2);% x1 卷积 x2 x4=x1*exp(-j*nx1'*w);% x1 频率特性 x5=x2*exp(-j* nx2'*w);% x2 频率特性 x6=x3*exp(-j*nx3'*w);% x1 x7=x4.*x5; 卷积x2频率特性

subplot(2,2,1),stem( nx1,x1),axis([-1,15,0,15]),title('x1'); subplot(2,2,2),stem( nx2,x2),axis([-1,15,0,5]),title('x2'); subplot(2,1,2),stem(nx3,x3),axis([-1,25,0,80]);title('x1 卷积 x2 结

果 x3');

M

1

M

2

x4=2T x1 +-3'M 3

figure,subplot(2,2,1),stem(x4,'filled'),title('x1 的DTFT吉果x4');

subplot(2,2,2),stem(x5,'filled'),title('x2 的DTFT吉果x5');

subplot(2,2,3),stem(x6,'filled'),title('x3 的DTFT吉果x6');

subplot(2,2,4),stem(x7,'filled'),title('x4 的DTFT吉果x7'); figure,subplot(3,2,1),stem(w,abs(x6)), ylabel('幅度'),title('x1 卷

积x2 的DTFT');

subplot(4,2,3),stem(w,a ngle(x6)),ylabel(' 相位')

subplot(4,2,5),stem(w,real(x6)),ylabel(' 实部')

subplot(4,2,7),stem(w,imag(x6)),ylabel(' 虚部')

subplot(4,2,2),stem(w,abs(x7)), title('x1 与x2 的DTFT的乘积');

subplot(4,2,4),stem(w,a ngle(x7));

subplot(4,2,6),stem(w,real(x7));

subplot(4,2,8),stem(w,imag(x7));

(b)结果:

wl

xl卷枳買2结果

x3

⑶共轭:(a )代码:

xln=[1 2 3 4 5 6 7 8 9 10 11 12]; w=-10:10;

N1= le ngth(x1 n); n1=0:N1-1; x1=real(x1 n); x2=imag(x1 n); x2n=x1-j*x2;

X 仁 x2 n*(exp(-j)4( n1'*w)); X2=x1 n*(exp(j)4( n1'*w)); x3=real(X2); x4=imag(X2); X2=x3-j*x4;

figure,subplot(211);stem(w,X1,'.');title('x1 n 共轭的 DTFT');

subplot(212);stem(w,X2,'.');title('x1 n

的 DTFT 取共轭且反折');

1000

泊卷积x2的

DIFT 100D

5

900

-5

10

5 和与戏的DTFT 前乘帜

-G

相关主题
文本预览
相关文档 最新文档