Cut off frequency for low pass filter Hi I am trying to use a low pass filter in Matlab. I am trying to use the simple butterworth filter. 

I have defined dataset say "data". Then I created the butterworth filter as follows:

[B,A]=butter(2,0.01)


Butterworth design require the user to give N and Wn. I used N as 2 and Wn as 0.01. Here, I randomly chose the value of Wn to 0.01.

My data is a hourly data and I want to apply 48 hour low pass filter. What would be the cut off frequency in my case ? 

After that I used the following code to design a filter:

filter(B,A,data)


The filtered data looks good but I want to know what cutoff frequency should I use. 

Thanks.
The butter command expects a normalized frequency from 0 to 1, where 1 is the Nyquist frequency.  In other words, Wn is in half-cycles per sample.

So you just divide your desired frequency (1 cycle / 48 hours) by half the sample rate ((1 sample per hour)/2), giving Wn = 0.04167 half-cycles per sample.