ex5_1.m
来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 22 行
M
22 行
%
%
%
clear;
w0=-50;
w1=50;
w=w0:0.01:w1;
t=0:0.01:6;
L=input('input the value of L:');
C=input('input the value of C:');
wc=1/sqrt(L*C);
H=sqrt(1./(((1-(w/wc).^2).^2+(w/wc).^2)));
phi=-57.3*atan((w/wc)./((1-(w/wc).^2)+eps));
h=2*wc/sqrt(3)*exp(-0.5*wc*t).*sin(0.866*wc*t);
clf;
subplot(3,1,1)
plot(w,H);grid on;title('the magnitude response');
subplot(3,1,2)
plot(w,phi);grid on;title('the phase response');
subplot(3,1,3)
plot(t,h);grid on;title('the impulse response')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?