Filter löschen
Filter löschen

How can I add a filter to remove certain frequencies?

39 Ansichten (letzte 30 Tage)
Stephanie
Stephanie am 8 Nov. 2014
Beantwortet: Stalin Samuel am 8 Nov. 2014
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)');

Antworten (1)

Stalin Samuel
Stalin Samuel am 8 Nov. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by