数字图像处理实验2Word文档下载推荐.docx

上传人:b****6 文档编号:19241187 上传时间:2023-01-04 格式:DOCX 页数:9 大小:291.77KB
下载 相关 举报
数字图像处理实验2Word文档下载推荐.docx_第1页
第1页 / 共9页
数字图像处理实验2Word文档下载推荐.docx_第2页
第2页 / 共9页
数字图像处理实验2Word文档下载推荐.docx_第3页
第3页 / 共9页
数字图像处理实验2Word文档下载推荐.docx_第4页
第4页 / 共9页
数字图像处理实验2Word文档下载推荐.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

数字图像处理实验2Word文档下载推荐.docx

《数字图像处理实验2Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《数字图像处理实验2Word文档下载推荐.docx(9页珍藏版)》请在冰豆网上搜索。

数字图像处理实验2Word文档下载推荐.docx

x5=[n>

=0.01];

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

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

x3=(exp(-j).^(t2'

*w));

x4=x2*x3;

subplot(2,2,1);

plot(t1,x1);

axis([011.1*min(x2)1.1*max(x2)]);

xlabel('

x(n)'

);

ylabel('

title('

原信号x1'

t'

x1'

subplot(2,2,3);

stem(t2,x2);

原信号采样结果x2'

x2'

subplot(2,2,2);

stem(n,x5);

axis([011.1*min(x5)1.1*max(x5)]);

n'

采样函数x2'

subplot(2,2,4);

stem(t2,x4);

axis([01-0.2+1.1*min(x4)1.1*max(x4)]);

x4'

DTFT结果x4'

(b)结果:

2.用以下两个有限长序列来验证DTFT的线性、卷积和共轭特性;

x1(n)=[123456789101112];

x2(n)=R10(n)

(1)线性:

w=linspace(-8,8,10000);

nx1=[0:

11];

nx2=[0:

9];

x1=[123456789101112];

x2=[1111111111];

x3=[x2,zeros(1,(length(x1)-length(x2)))];

x4=2*x1+3*x3;

X1=x1*exp(-j*nx1'

*w);

%频率特性

X3=x3*exp(-j*nx1'

X4=x4*exp(-j*nx1'

%频率特性

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

),ylabel('

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

subplot(5,3,3),stem(nx1,x4),axis([-1,13,0,26]);

x4=2*x1+3*x3'

subplot(5,3,4),plot(w,abs(X1));

ylabel('

幅度'

subplot(5,3,7),plot(w,angle(X1));

相位'

subplot(5,3,10),plot(w,real(X1));

实部'

subplot(5,3,13),plot(w,imag(X1));

虚部'

subplot(5,3,5),plot(w,abs(X3));

subplot(5,3,8),plot(w,angle(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,angle(X4));

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

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

(2)卷积:

nx1=0:

11;

nx2=0:

9;

nx3=0:

20;

w=linspace(-8,8,40);

%w=[-8,8]分10000份

x3=conv(x1,x2);

%x1卷积x2

x4=x1*exp(-j*nx1'

%x1频率特性

x5=x2*exp(-j*nx2'

%x2频率特性

x6=x3*exp(-j*nx3'

%x1卷积x2频率特性

x7=x4.*x5;

subplot(2,2,1),stem(nx1,x1),axis([-1,15,0,15]),title('

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

subplot(2,1,2),stem(nx3,x3),axis([-1,25,0,80]);

x1卷积x2结果x3'

figure,subplot(2,2,1),stem(x4,'

filled'

),title('

x1的DTFT结果x4'

subplot(2,2,2),stem(x5,'

x2的DTFT结果x5'

subplot(2,2,3),stem(x6,'

x3的DTFT结果x6'

subplot(2,2,4),stem(x7,'

x4的DTFT结果x7'

figure,subplot(3,2,1),stem(w,abs(x6)),ylabel('

x1卷积x2的DTFT'

subplot(4,2,3),stem(w,angle(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,angle(x7));

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

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

(3)共轭:

x1n=[123456789101112];

N1=length(x1n);

n1=0:

N1-1;

x1=real(x1n);

x2=imag(x1n);

x2n=x1-j*x2;

X1=x2n*(exp(-j).^(n1'

X2=x1n*(exp(j).^(n1'

x3=real(X2);

x4=imag(X2);

X2=x3-j*x4;

figure,subplot(211);

stem(w,X1,'

.'

x1n共轭的DTFT'

subplot(212);

stem(w,X2,'

x1n的DTFT取共轭且反折'

3.求LTI系统的频率响应

给定系统H(Z)=B(Z)/A(Z),A=[0.98777-0.311830.0256]

B=[0.989970.9890.98997],求系统的幅频响应和相频响应。

(要求使用filter(B,A,δ(n))求解。

(a)结果:

A=[0.98777-0.311830.0256];

B=[0.989970.9890.98997];

C=[100000000000000000000000000]

y=filter(B,A,C);

stem(y,'

原始序列'

mag=abs(y);

ph=angle(y);

ph=ph*180/pi;

stem(mag,'

幅频特性'

时间信号n'

信号幅度'

stem(ph,'

相频特性'

信号相位'

4.采样和频谱混叠

给定信号x(t)=100*exp(-100*t)*cos(2*pi*500*t),求该信号的频谱;

当采样频率分别为fs1=2000HZ,fs2=1000HZ;

fs3=500HZ;

fs4=200HZ,时输出序列的DTFT。

x=100*exp(-100*t).*cos(2*pi*500*t);

t=-2:

0.1:

2;

y=x*(exp(-j).^(t'

subplot(2,1,1),plot(t,x);

subplot(2,1,2),plot(w,y);

原始信号的频谱'

figure,fs1=2000;

Ts1=1/fs1;

n1=-2:

Ts1:

fs2=1000;

Ts2=1/fs2;

n2=-2:

Ts2:

fs3=500;

Ts3=1/fs3;

n3=-2:

Ts3:

fs4=200;

Ts4=1/fs4;

n4=-2:

Ts4:

x1=100.*exp(-100*n1).*cos(2*pi*500*n1);

y1=x1*(exp(-j).^(n1'

subplot(221);

plot(w,y1);

经2000Hz采样后信号的DTFT'

x2=100.*exp(-100*n2).*cos(2*pi*500*n2);

y2=x2*(exp(-j).^(n2'

subplot(222);

plot(w,y2);

经1000Hz采样后信号的DTFT'

x3=100.*exp(-100*n3).*cos(2*pi*500*n3);

y3=x3*(exp(-j).^(n3'

subplot(223);

plot(w,y3);

经500Hz采样后信号的DTFT'

x4=100.*exp(-100*n4).*cos(2*pi*500*n4);

y4=x4*(exp(-j).^(n4'

subplot(224);

plot(w,y4);

经200Hz采样后信号的DTFT'

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1