freqs_m.m

来自「the file contain many matlab signal sour」· M 代码 · 共 18 行

M
18
字号
function [db,mag,pha,w]=freqs_m(b,a,wmax);
% Computation of s-domain frequency response:Modified version 
% -------------------------
% [db,mag,pha,w]=freqs_m(b,a,wmax);
% db=Relative magnitude in db over [0 to wmax]
% mag=Absolute magnitude over [0 to wmax]
% pha=Phase response in radians over [0 to wmax]
% w=array of 500 frequency samples between [0 to wmax]
% b=Numerator polynomial coefficents of Ha(s)
% a=Denominator polynomial coefficents of Ha(s)
% wmax=Maximun frequency in rad/sec over which response is desired
%
w=[0:500]*wmax/500;
H=freqs(b,a,w);
mag=abs(H);
db=20*log10((mag+eps)/max(mag));
pha=angle(H);

⌨️ 快捷键说明

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