?? example6_1.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 + -