Filter Designer

버전 1.0.4 (1.43 KB) 작성자: Ayad Al-Rumaithi
Helps determining the order of digital filters
다운로드 수: 1.9K
업데이트 날짜: 2023/4/24

라이선스 보기

Helps determining the order of digital filters. Change the filter order to get suitable response. Supports butterworth and filtfilt filters.
function FilterDesigner(fc1,fc2,fs,type,orderh,orderl)
Input:
fc1: lower-bound cutoff frequency
fc2: upper-bound cutoff frequency
fs: sampling frequency
type: filter type 'butter' for butterworth, 'filtfilt' for filtfilt
orderh: filter order for high pass filter
orderl: filter order for low pass filter
Output:
Plots frequency response of the high-pass, low-pass, and band-pass filters.
Important Notes:
1-filtfilt filter here is assumed to be buttworth filter applied to the input data in both the forward and reverse directions to get rid of phase distortion.
2-After choosing the suitable filter order, apply the filter to your data using the following lines:
for butterworth:
[B1,A1] = butter(orderh,fc1/(fs/2),'high');
[B2,A2] = butter(orderl,fc2/(fs/2),'low');
yh=filter(B1,A1,x); %apply high-pass filter to the data
yl=filter(B2,A2,x); %apply low-pass filter to the data
y=filter(B2,A2,yh); %apply band-pass filter to the data
for filtfilt:
[B1,A1] = butter(orderh,fc1/(fs/2),'high');
[B2,A2] = butter(orderl,fc2/(fs/2),'low');
yh=filtfilt(B1,A1,x); %apply high-pass filter to the data
yl=filtfilt(B2,A2,x); %apply low-pass filter to the data
y=filtfilt(B2,A2,yh); %apply band-pass filter to the data
where
x: is the data vector.

인용 양식

Ayad Al-Rumaithi (2024). Filter Designer (https://www.mathworks.com/matlabcentral/fileexchange/71966-filter-designer), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2017b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Butterworth에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.4

description

1.0.3

descrption and summary

1.0.2

code and description

1.0.1

Description

1.0.0