I am using notch filter, below are the commands for calculating

filter coeff:

f0 = 0.4 % freq to be notched

b = [1 -2*cos(2*pi*f0)

1];

% compute the filter numerator coeff "b"

r =0.995;

a = [1 -2*r*cos(2*pi*f0)

r^2];

% compute the filter denominator coeff "a"

[h,f1] =freqz(b,a,256);

figure

plot(f1/(2*pi), abs(h), 'r');

If "f0" i.e the freq to be notched is less than 0.5 then the plot

shows the notch at f0, but if its greater than 0.5 then the plot

shows some different frequency. Any one has any clue regarding this?

I am using notch filter, below are the commands for calculating

filter coeff:

f0 = 0.4 % freq to be notched

b = [1 -2*cos(2*pi*f0)

1];

% compute the filter numerator coeff "b"

r =0.995;

a = [1 -2*r*cos(2*pi*f0)

r^2];

% compute the filter denominator coeff "a"

[h,f1] =freqz(b,a,256);

figure

plot(f1/(2*pi), abs(h), 'r');

If "f0" i.e the freq to be notched is less than 0.5 then the plot

shows the notch at f0, but if its greater than 0.5 then the plot

shows some different frequency. Any one has any clue regarding this?