Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: An Interesting Real-World Problem...
Date: Thu, 2 Jul 2009 18:34:01 +0000 (UTC)
Organization: University of Nottingham
Lines: 16
Message-ID: <h2iuip$nm2$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246559641 24258 172.30.248.38 (2 Jul 2009 18:34:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 2 Jul 2009 18:34:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1795689
Xref: news.mathworks.com comp.soft-sys.matlab:552488


I've been using MATLAB for around 6 months now, and only now have I needed to do something that is actually mathematically-related!  I'm a chemist, so high-level maths is not my strong point.

I have some real-world data that I'd like to pick out the dramatic change in gradient of:

http://www.flickr.com/photos/40058045@N07/3681613485/
(wish I could include this in the post but never mind)

Because the data is quite noisy (and not random) this is quite awkward.  In that picture there are about 5000 points.  You cannot smooth too much (in practice >300) without losing the information about the point at which the gradient changes (the smoothed data starts to cut the corner).  Even when the data is smoothed, the presence of non-random noise means that the "flat" part of the curve is not actually flat, and there are several stationary points (calculated thanks to STATIONARY from FEX) along that flat part.

I've also tried fitting a least-squares linear regression using POLYFIT for each of the data points with ~500 points either side of it.  This was with the aim of picking out the part of the graph with the lowest R2 value - this I assumed would represent the fast gradient change.  However, this still does not pick out the right point, selecting a point about 0.1 hours before it should be, and I can't think why this is the case.

Any other good suggestions?

Thanks

Geoff