dongchao1207 发表于 2009-5-30 23:52

求MATLAB freqz_m函数的源码

百度Google都搜不到,好不容易找到个还要付费,拜托各位有的发个源码:lol 谢谢:loveliness:

ChaChing 发表于 2009-5-31 00:01

搜寻一下matlab路径, 不就有freqz.m !?

beyondhxf 发表于 2009-5-31 07:59

回复 楼主 dongchao1207 的帖子


which freqz.m

friendchj 发表于 2009-5-31 11:47

可能楼主需要的 freqz_m.m,这个其实是能搜到的。

function = freqz_m(b,a);
% Modified version of freqz subroutine
% ------------------------------------
% = freqz_m(b,a);
%db = Relative magnitude in dB computed over 0 to pi radians
% mag = absolute magnitude computed over 0 to pi radians
% pha = Phase response in radians over 0 to pi radians
% grd = Group delay over 0 to pi radians
%   w = 501 frequency samples between 0 to pi radians
%   b = numerator polynomial of H(z)   (for FIR: b=h)
%   a = denominator polynomial of H(z) (for FIR: a=)
%
= freqz(b,a,1000,'whole');
    H = (H(1:1:501))'; w = (w(1:1:501))';
mag = abs(H);
   db = 20*log10((mag+eps)/max(mag));
pha = angle(H);
%pha = unwrap(angle(H));
grd = grpdelay(b,a,w);
%grd = diff(pha);
%grd = ;
%grd = ;
%grd = median(grd)*500/pi;

dongchao1207 发表于 2009-6-1 14:43

回复 地板 friendchj 的帖子

就是这个,谢谢:loveliness: 我搜到的都要money才让下:@L
页: [1]
查看完整版本: 求MATLAB freqz_m函数的源码