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

📄 problem6_23.m

📁 经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助
💻 M
字号:
%========================================================================
% program name:problem6_23.m
%========================================================================
clear,close all,
dw=0.05;dt=0.01;w0=6;t0=30;t=-t0:dt:t0;
w=-w0:dw:w0;L=length(w);
H1=u(w+2)-u(w-2-dw);
phai=w*0.2;
phai=0;
%phai=((-pi/2)*u(-w)+(pi/2)*u(w));phai((L-1)/2)=0;
H=H1.*exp(j*phai);
h=H*exp(j*w'*t)*dw/(2*pi);
subplot(221)
plot(w,H1),title('The magnitude response of the filter')
axis([-4,4,0,1.1]),grid on,
subplot(222)
plot(w,phai),title('The phase response of the filter')
axis([-4,4,-1.1*pi/2,1.1*pi/2]),grid on,
subplot(224)
plot(t,real(h)),axis([-6,6,min(real(h)),max(real(h))]),grid on,
title('The impulse response of the filter')
subplot(223)
H=real(h)*exp(-j*t'*w)*dt;
plot(w,abs(H)),axis([-4,4,0,max(abs(H))]),grid on,
title('The magnitude response from h(t)')

⌨️ 快捷键说明

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