Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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:


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


share|improve this question

migrated from Feb 7 '13 at 18:10

This question came from our site for professional and enthusiast programmers.

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.

share|improve this answer

Filters are agnostic to the sampling frequency you use. What matters is the normalized cut off frequency. As a result the filter obtained from a function like butter will work for any sampling frequency. A value of 1 corresponds to half the sampling frequency.

In your case your sampling frequency is 1 hr$^{-1}$. Hence a value of 0.01 corresponds to a frequency cutoff of .01 $\times$ 0.5 = .005 hr$^{-1}$ or 200 hrs time.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.