how to use fir1 for highpass filter with window

1 次查看(过去 30 天)
i have a problem while using fir1 with highpass and window function .
ex.
fc=input('cutoff frequency : ');
fs=input('sampling frequency : ');
order=input('order : ');
[b,a] = fir1(order,(2*fc)/fs,'high',rectwin(order+1));
but when i use '(order+2)' , there is no problem.
fc=input('cutoff frequency : ');
fs=input('sampling frequency : ');
order=input('order : ');
[b,a] = fir1(order,(2*fc)/fs,'high',rectwin(order+2));
the key point :: i want to use order = 5 and i want the result of 5 filter coefficients .

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matched Filter and Ambiguity Function 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by