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

📄 example6_1.m

📁 经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助
💻 M
字号:
%==========================================================================
%  Name:example6_1.m
%  
%==========================================================================
clear;close all,
w=0:0.1:400;
phi1=-2*atan((2*0.066*(w/50)+eps)./(1-(w/50).^2+eps));
phi2=-2*atan((2*0.033*(w/150)+eps)./(1-(w/150).^2+eps));
phi3=-2*atan((2*0.058*(w/300)+eps)./(1-(w/300).^2+eps));

phi4=-2*atan((2*0.066*(w/50)+eps)./(1-(w/50).^2+eps))-2*pi*(u(w-50)-u(w-150));
phi5=-2*atan((2*0.033*(w/150)+eps)./(1-(w/150).^2+eps))-4*pi*(u(w-150)-u(w-300));
phi6=-2*atan((2*0.058*(w/300)+eps)./(1-(w/300).^2+eps))-6*pi*u(w-300);
phi7=phi1+phi2+phi3;
phi8=phi4+phi5+phi6;
phi8(501)=-3.2308;
phi8(1501)=-9.4802;
phi8(3001)=-15.5747;
for i=1:4000;
    tao(i)=-(phi8(i+1)-phi8(i))/0.1;
end
tao(4001)=tao(4000);

t=0:0.002:2;H=exp(j*phi8);
h=H*exp(j*w'*t)*0.1/(2*pi); 
subplot(411);plot(w,phi7,'r');grid on;%title('The input signal x(t)');axis([-10,10,0,1])
title('The phase (rad)')
subplot(412);plot(w,phi8,'r');grid on;ylabel('The phase (rad)')
subplot(413);plot(w,tao,'r');grid on;axis([0,400,0,0.8])
xlabel('Frequency in Hz')
ylabel('The group delay (sec)')

subplot(414);plot(t,h,'r');grid on;%axis([0,400,0,0.8])
xlabel('Time t'),axis([0,2,-20,20])
ylabel('The impulse response h(t)')

⌨️ 快捷键说明

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