How can I add a filter to remove certain frequencies?
조회 수: 39 (최근 30일)
이전 댓글 표시
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)');
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Filter Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!