how to use fir1 for highpass filter with window

4 vues (au cours des 30 derniers jours)
anchitta sangsawang
anchitta sangsawang le 22 Fév 2020
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 .

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by