How can I add a filter to remove certain frequencies?
Afficher commentaires plus anciens
I have a function that has frequencies from 0 to 30 and from 80 to 100. Essentially, I am trying to cut the function so that only the frequencies from 0 to 30 show, but the function is still the same length. Since I still want the function the same length, I have thought about using a low pass filter to block any frequencies above 30 Hz and then adding zeros to the end to make it the same length. For some reason this doesn't work. I have attached a picture of my original plot.
This is my code so far. fs=100; t=0:1/fs:1-1/fs; x1=fft(VarName1); figure mag=abs(x1); f=(0:length(x1)-1)*100/length(x1); plot(f,mag); ylabel('Magnitude'); xlabel('Frequency'); title('x(n)');

Réponses (1)
Catégories
En savoir plus sur Digital Filter Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!