low frequency filtering matlab

Status
Not open for further replies.

Vincent Lai

Newbie level 2
Joined
Mar 18, 2014
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
14
hello everyone,

I have got some displacement data here with contain low and high frequency, i want to filter out the low frequency so that the data can be normalize on zero, i read something on internet which i can use [z,p,k] = butter on matlab, im new to matlab so i dont really know what to do, there are 2000 data in one set and dt is 0.01 second, the wave displacement is 0.25hz, help please.

Kind regard
Vincent

P.s I have attach the data and a picture with this question thank you
 

Attachments

  • data detrend_s.txt
    23.5 KB · Views: 53
Last edited:

Hi,

I understand u have data with 100 samples per second [fs or the sampling frequency] ( assuming dt = 0.01s is the sampling interval)
this will give your nyquist frequency as fs/2 = 50 Hz, this is important as the cut off frequency of your filter is normalized with respect to the nyquist frequency.
fc is your cutoff frquency
you need to generate the filter coefficients first
so use [b,a] = butter(n, fc/fn, 'low')

then output = filter(b,a,data);

hope it helps

check out these links as well
https://www.mathworks.in/help/matlab/ref/filter.html
https://www.mathworks.in/help/signal/ref/butter.html
 
Hi deboleena18,
the butter souldnt it be a high pass filter instead?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…