HOW TO APLLY FILTER ON A SIGNAL

2 vues (au cours des 30 derniers jours)
Tina
Tina le 22 Déc 2019
Commenté : Tina le 22 Déc 2019
So basicalyi have to apply a 10th order (hamming window) band passfilter on a signal.I have designed the filter but unable to apply on signal
fs=300 hz,and fc1=10 and fc2 =15 . THe design code is following please tell me how to apply it on a signal
n=10;
fs=300;
dt=1/fs;
t=0:dt:1-dt;
fc1=10;
fc2=15;
wc1=fc1/(fs/2);
wc2=fc2/(fs/2);
b_p=fir1(n,[wc1 wc2],'bandpass',hamming(n+1));
[H,w] = freqz(b_p,1);
figure
plot(w/pi,20*log(abs(H)),'b')
PLEASE HELP!!!!!!

Réponse acceptée

Image Analyst
Image Analyst le 22 Déc 2019
You need to continue the code by calling the filter() function. See further down in the help of fir1() for an example where they high pass filtered the signal.
  3 commentaires
Image Analyst
Image Analyst le 22 Déc 2019
Not sure what to expect, but if it gives that, then that's what you told it to give you. It will do just what you tell it to. Are they both space or time domain signals? I don't know why the x axes tick marks are different.
Tina
Tina le 22 Déc 2019
And can you also guide ,how can i plot impulse response of filter

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by