⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p2_4.m

📁 Digital Signal Processing-A Computer-Based Approach(Second Edition)Sanjit K.Mitra实验指导书练习题matlab程序
💻 M
字号:
% Program P2_4.m
% Convolution Property of DTFT
close all;clear all;
w = -pi:2*pi/255:pi;
x1 = [1 3 5 7 9 11 13 15 17]; x2 = [1 -2 3 -2 1];
y = conv(x1,x2);
h1 = freqz(x1, 1, w); h2 = freqz(x2, 1, w);
hp = h1.*h2;
h3 = freqz(y,1,w);
subplot(2,2,1);plot(w/pi,abs(hp));grid
title('Product of Magnitude Spectra')
subplot(2,2,2);plot(w/pi,abs(h3));grid
title('Magnitude Spectrum of Convolved Sequence')
subplot(2,2,3);plot(w/pi,angle(hp));grid
title('Sum of Phase Spectra')
subplot(2,2,4);plot(w/pi,angle(h3));grid
title('Phase Spectrum of Convolved Sequence')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -