Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!d7g2000prl.googlegroups.com!not-for-mail
From: TideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: An Interesting Real-World Problem...
Date: Thu, 2 Jul 2009 13:11:49 -0700 (PDT)
Organization: http://groups.google.com
Lines: 39
Message-ID: <f98e5c3c-9d6c-47cb-83ff-8fee56c227d4@d7g2000prl.googlegroups.com>
References: <h2iuip$nm2$1@fred.mathworks.com>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1246565510 9907 127.0.0.1 (2 Jul 2009 20:11:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 2 Jul 2009 20:11:50 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: d7g2000prl.googlegroups.com; posting-host=202.78.152.105; 
	posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) 
	Gecko/2009060215 Firefox/3.0.11,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 bc1
Xref: news.mathworks.com comp.soft-sys.matlab:552531


On Jul 3, 6:34 am, "Geoffrey Akien" <geoff.ak...@gmail.com> wrote:
> 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

I'd use orthogonal wavelet decomposition.  Empirical mode
decomposition is another alternative.
Here's a web page where I show how you can apply wavelet decomposition
to a signal similar to yours to extract information about the signal
at different timescales:
http://www.tideman.co.nz/Salalah/OrthWaveDecomp.html