How to design a FIR Filter

조회 수: 3 (최근 30일)
Ramesh Vukyam
Ramesh Vukyam 2012년 4월 1일
답변: Tina 2019년 12월 22일
Hello, I am new to matlab. I want to design FIR,Butterworth and some RC filters in Matlab with GUIDE. Someone told me that I can design it using Signal Processing Toolbox. Is it possible to implement these filters without any toolboxes otherthan just matlab and GUIDE.

채택된 답변

Wayne King
Wayne King 2012년 4월 1일
Yes, it is possible, but you will have to write a lot of code. The Signal Processing Toolbox (SPT) enables you to create these filters easily. Filter design code can be very complicated, so you will have to invest a lot of time to do it without SPT.

추가 답변 (1개)

Tina
Tina 2019년 12월 22일
not sure about rc filter but FIR and butterworth filter can be designed by the help of built in function fir1,Filter.
b = fir1(48,wc);
freqz(b,1,512)
for butterworth you use butter(L).
n=%order of filter
fs=%sampling frequency
fc= %your corner frequency
wc=fc/(fs/2);%cuttoff freq of filter
b=fir1(n,wc,'low',butter(n+1);
[H,w] = freqz(b,1);
plot(w/pi,20*log(abs(H)))
title('butterfilter')
and you can design simple filter by
d=designfilt('lowpassfir','filterorder',n,'cutoffFrequency',fc,'samplerate',fs);
Filtered=filter(d,signal)%signal is the signal you wont to filter

Community Treasure Hunt

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

Start Hunting!

Translated by