📄 fre_response.m
字号:
% Name: frequs.m
% ===============================================================
clear,close all
num=input('Input the numerator polynomial coefficient vector =:');
den=input('Input the denominator polynomial coefficient vector =:');
reg=input('Input the frequency region w=');
w=-3*reg:0.01*reg:3*reg;
[h,w]=freqs(num,den,w);
r=real(h);
i=imag(h);
subplot(2,1,1)
plot(w,abs(h));
grid on;title('magnitude response');
subplot(2,1,2)
plot(w,(180/pi)*atan(i./(r+eps)));grid on;
xlabel('frequency radians/s ');title('phase response');
figure(2)
subplot(221)
impulse(num,den)
subplot(222)
step(num,den)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -