매트랩에서 필터 적용하기

매트랩에서는 imfilter만 써 봤었는데.. 막상 low pass filter를 어떻게 써야 될지 몰라서 막막해 하다가 구글에서 찾았음.


% Examples of Butterworth filter design using Matlab function "butter"
%
[b,a]=butter(n,0.4)  % nth order low pass filter with normalized
% cut-off frequency 0.4
[b,a]=butter(n,0.4,'high')  % nth order high pass filter
[b,a]=butter(n,[0.2 0.5])    % 2*nth order bandpass filter with edge
% frequencies 0.2 and 0.5
[b,a]=butter(n,[0.2 0.5],'stop')    % nth order bandstop filter with edge
% frequencies 0.2 and 0.5
%
y=filter(b,a,x) % This applies the filter to the input data "x"


출처 :
http://www.physics.uq.edu.au/people/jones/ph360/lectures/topic4/l4/node11.html

댓글

Designed by JB FACTORY