1.0

1.0 | 1 rating Rate this file 21 Downloads (last 30 days) File Size: 1.42 KB File ID: #26584

Low Pass Butterworth Filter

by Avinash Parnandi

 

03 Feb 2010 (Updated 03 Feb 2010)

Implementation of a low pass Butterworth filter with comments.

| Watch this File

File Information
Description

In this code I have implemented a low pass filter using the filtfilt command. It plots the actual data, filtered data and the filter characteristics. Its pretty well commented out. Feel free to change portions of the code depending on your requirements i.e. the data, cutoff frequency, order of the filter etc.

MATLAB release MATLAB 7.0.4 (R14SP2)
Other requirements I have written and tested this code on Matlab 7.0.4 on a machine running Ubuntu 9.04. Please email me if you have any issues on other platforms.
Tags for This File  
Everyone's Tags
butterworth(4), filtfilt(2), low pass filter, lpf
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
18 Jul 2012 Haifeng  
03 Feb 2010 Avinash Parnandi

Thank you for your review. I will try to comment the code properly, make it a function and then re-host it. The reason why I hosted this code was, when I was looking around for a simple low pass filter code I could not find a straight forward implementation. I know matlab documentation has good explanation, but being from a non signal processing background I could not make it work and understand the complete logic behind it. When I got this code working I felt that it might be useful to someone (like me) and so uploaded it here. Definitely, I will look into your suggestions. Thanks.

03 Feb 2010 Rob Campbell

Please don't take this the wrong way, but this submission is of little use to anybody right now. To begin with, it's more or less a re-hash of the Matlab documentation. For those who know about this stuff it's redundant and for those who don't there aren't enough comments to explain what's going on. It is not even a good example of how to code in Matlab since it isn't a nicely commented function but a script.

If you modify it to include more detail and lay it out better then it could be a rather handy example.

Updates
03 Feb 2010

Added some more comments.

Contact us