I have a datafile contains data sets (size 200* 15) .how can I apply on all the data a lowpass butterworth filter of 2-order with cutoff fre 10 HZ
조회 수: 1(최근 30일)
David J. Mack 2016년 12월 29일
편집: David J. Mack 2016년 12월 29일
%Assuming X is your 200x15 data matrix and fSInHz is the sampling rate of the data.
filtFCInHz = 10; %Cut-off frequency.
filtOrder = 2; %Order.
[b,a] = butter(filtOrder,filtFCInHz/(fSInHz/2)); %Normalize against Nyquist frequency.
Y = filter(b,a,X); %Y is the filtered 200x15 output.
If you want to apply zero-phase filtering (which is recommended for time series), use FILTFILT instead of FILTER.