Path: news.mathworks.com!not-for-mail
From: "Mario " <nospam@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: doubt about filtering
Date: Mon, 22 Sep 2008 20:36:03 +0000 (UTC)
Organization: UBC
Lines: 33
Message-ID: <gb8vjj$b8u$1@fred.mathworks.com>
Reply-To: "Mario " <nospam@yahoo.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1222115763 11550 172.30.248.35 (22 Sep 2008 20:36:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 22 Sep 2008 20:36:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1244954
Xref: news.mathworks.com comp.soft-sys.matlab:491392


I'm trying to analyze some data but I need to filter it before. Here a few examples of the data I'm working on:
http://www.geocities.com/mariopwr/data317.jpg
http://www.geocities.com/mariopwr/data740.jpg
http://www.geocities.com/mariopwr/data5044.jpg

http://www.geocities.com/mariopwr/Archive.zip


I'd like to fit a spline and then analyze it but i don't know which is the best way to approximate my data.
I tried to filter it but every time i have to change a few parameters if i want to get a good approximation. Here some examples of data filtering (I used a butter filter because I don't have any idea about what is best for me) and spline fitting
 
[b,a] = butter(1, 0.13,'low'); % N,Wn
Y = filtfilt(b,a,Y);
http://www.geocities.com/mariopwr/data317F.jpg

[b,a] = butter(1, 0.17,'low'); % N,Wn
Y = filtfilt(b,a,Y);
http://www.geocities.com/mariopwr/data740F.jpg

[b,a] = butter(1, 0.11,'low'); % N,Wn
Y = filtfilt(b,a,Y);
http://www.geocities.com/mariopwr/data5044F.jpg


I'm wondering if there is a way to automatically get a good approximation of my data or if there is a better way to filter than the one i used. 
What i'd want to do with my data is measuring the peak-to-peak distance and comparing curve slope after and before every peak so i'd like to have a filter function that keeps the high peaks and filter the noise outside these..

I hope you get my problem and can help me! Thank you.
Regards,

Mario