# Matlab low-pass filter implementation and transfer function

1. May 2, 2010

### philnev

Hey guys,

Basically, I have been doing some testing with regards to tactile vibrations (I know that isn't very electrical) and using a HET have developed several amplitude plots in the time domain. I've been sampling at 5000Hz and I want to remove the noise from my signals to leave me with a clean (hopefully!) sine wave. I then want to use this wave, along with another amplitude-time graph (basically a side profile of the sample used for testing) in order to produce a transfer function for the human finger. I undersrtand that Matlab can do this for me but I can't figure out how!

Sorry if i've posted this in the wrong area, can anyone help!?

2. May 3, 2010

### uart

You don't say what type of filter or what cutoff frequecy etc that you require? I'll give you an example anyway. Below is an IIR implementation of a 2nd order Butterworth LPF with 50Hz cutoff frequency.

Code (Text):

fs=5000;                    % Sample Freuency
fn=fs/2;                    % Nyquist Frequency
fc=50;                      % Desired Cutoff frequency (example)
[b,a]=butter(2,fc/fn);      % IIR Filter coefficients, b=num, a=denom
xf=filter(b,a,x);           % apply filter to x

BTW. "filter" is an inbuilt function whereas "butter" (and other filter implementations) usually come with a signal processing toolbox. Both are available with a standard installation of gnu octave.

Last edited: May 3, 2010
3. May 3, 2010

### philnev

I knew I would forget to add something! The cut-off frequency is a little vague to me at the moment as I have not been able to ascertain the absolute frequency of the signal through FFT. Thanks very much for your reply though, it definitely helps with matlab!