满意答案
maop网友
2013.12.31
采纳率:55% 等级:12
已帮助:12413人
找不到函数的脚本文件,也就是你的运行路径下调不到freqs_m函数。下面有代码,在你的程序运行路径下存成freqs_m.m就可以了。
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 = Maximum frequency in rad/sec over which response is desired
%
w = [0:1:500]*wmax/500;
H = freqs(b,a,w);
mag = abs(H);
db = 20*log10((mag+eps)/max(mag));
pha = angle(H);
01分享举报