# MATLAB: Butterworth filter cutoff frequency calculation

butterworth filter

Hi All, I am not a electrical engineer so my question may sound stupid. Sorry about that. I have a some noisy data and I want to filter my data using a butterworth filter of order 2. I am having trouble finding the cutoff frequency for the filter design. How do I calculate cutoff frequency? I am sampling my data every 10 seconds. Thnanks.

Fs = 0.1;                                                   % Sampling Frequency (Hz)Fn = Fs/2;                                                  % Nyquist FrequencyWp = [0.002  0.010]/Fn;                                     % Specify Bandpass FilterWs = [0.001  0.015]/Fn;                                     % Stopband (normalised)Rp = 10;                                                    % Passband Ripple (dB)Rs = 30;                                                    % Stopband Ripple (dB)[n,Wn] = buttord(Wp, Ws, Rp, Rs);[z,p,k] = butter(n,Wn);                                     % ZPK [SOS,G] = zp2sos(z,p,k);                                    % Convert To SOS for Stabilityfigure(2)freqz(SOS, 2^16, Fs)