阅读背景:

《DSP using MATLAB》Problem 8.36

来源:互联网 

上代码:

function [wpLP, wsLP, alpha] = lp2lpfre(wplp, wslp)
% Band-edge frequency conversion from lowpass to lowpass digital filter
% -------------------------------------------------------------------------
% [wpLP, wsLP, alpha] = lp2lpfre(wplp, wslp) 
%   wpLP = passband edge for the lowpass digital prototype 
%   wsLP = stopband edge for the lowpass digital prototype 
%  alpha = lowpass to lowpass transformation parameter
%   wplp = passband edge frequency for the given lowpass
%   wslp = stopband edge frequency for the given lowpass
%
%
if wplp <= 0 
	error('Passband edge must be larger than 0.')
end

if wslp <= wplp
	error('Stopband edge must be larger then Passband edge')
end

% Determine the digital lowpass cutoff frequencies:
wpLP = 0.2*pi;
alpha = sin((wpLP - wplp)/2)/sin((wpLP + wplp)/2);
wsLP = -angle((exp(-j*wslp)-alpha)/(1-alpha*exp(-j*wslp)));
function [wpLP, wsLP, alpha]



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: