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

📄 s10fig11.m

📁 Industrial Mathematics
💻 M
字号:
% exercise 10.29 Bode Plots
%
Q=4;
fmin = 5;           % min freq (in Hz) to view
fmax = 20;           % max freq (in Hz) to view
df=0.01;             % step size
f=fmin:df:fmax;     % frequency vector
w = 2*pi*f;         % radian freq vector
s = w*i;            %  
N= 20*pi*s/Q;           
D = s.*s  + 20*pi*s/Q + 400*pi*pi;
L = N./D ;       % left
N= 30*pi*s/Q;
D = s.*s  + 30*pi*s/Q + 900*pi*pi;  
R= N./D;            % right
H= 3.3*L.*R;
r = abs(H);         % gain at freq w
phi = angle(H);     % phase lead
 plot(f,r,'k-')    % gain vs freq in Hz
%plot(f,phi*180/pi,'k-')    %for phase plot in degrees
%plot(f,20*log10(r),'k-')     %  for decibels 
% replace with   plot(w,r) for       gain vs radian freq 

⌨️ 快捷键说明

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