Forums

kaiser problem !

Started by kianogo April 5, 2004
Hi

I am trying to design a kaiser filter.
Just for testing I set wp=0.3 and ws=0.4 to get the lowpass version
of the filter.
It seems changing the wp and ws does not swich between low- or
highpass or the leads to exact changes of the stopband and passband
regions accordingly!

anyone can help me to find out where im wrong?

thank a lot
k

In the example below the magnitude response looks like a highpass but
the plot doesn't match the specifications of wp and ws!?

%determine beta
N%6; %fix length
wp=0.8; %passband
ws=0.7; %stopband
trsBnd=(ws-wp)*pi; %transition band
A=(N*2.285*trsBnd)+8;
if A>50
beta=0.1102*(A-8.7)
elseif 21<=A<P
beta=0.5842*(A-21)^0.4+0.07886*(A-21)
elseif A<21
beta=0
end
b=kaiser(N,beta);
f=(-(length(b)-1)/2:1:(length(b)-1)/2)*2/length(b); %freq. axis
plot(f,log(abs(fft(b)))); %log magnitude response