function [a, b, err] = design_iirlpnorm(K) % % function [a, b] = design_iirlpnorm(K) % % designs the Doppler Filter (IIR) as best as possible. % K is the number of biquads, so, order is 2*K. % Christos Komninakis, June 2003. % n = 2*K; % fD = 0.2; fDN = 2*0.2; M = 1000; % end up with M+1 frequency points, including 0 and 1. L = floor(fDN*M); A = sqrt(1./sqrt(1-([0:L-1]./L).^2)); A = [ A sqrt(L*(pi/2-asin((L-1)/L))) ]; A = [ A zeros(1,M-L) ]; F = [0:1/M:1]; edges = [0 F(L+1) F(L+2) 1]; weights = ones(1,length(F)); % % Use the Matlab function iirlpnorm to design the filter % [b,a, err] = iirlpnorm(n,n, F, edges, A, weights); [H,W,S] = freqz(b,a,1000); plot(W/pi, 20*log10(abs(H))); grid on;