[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Smooth line approximating minima of a data series

From: Matthias Brennwald
Subject: Re: Smooth line approximating minima of a data series
Date: Wed, 24 Feb 2010 15:10:11 +0100

On Feb 24, 2010, at 3:03 PM, Ben Abbott wrote:

On Wednesday, February 24, 2010, at 03:04AM, "Matthias Brennwald" <address@hidden > wrote:
Dear all

Consider a series of data values that reflect a smooth function (e.g.
a low-degree polynomial), but there might be additional features in
the data (e.g. narrow peaks or noise). I'd like to fit a polynomial to
this data, whereby this polynomial reflects a smooth approximation of
the minima of the raw data (I call this the "base line"). The
following might help to illustrate what I'm trying to accomplish:

   x = [-1:0.01:1]; % x-axis values
   p = [-3 2 1 0]; yp = polyval (p,x); % make up a polynomial
reflecting the "base line" for illustration
   y = yp + rand(size(x)); % this would be the raw data
   plot (x,y,x,yp); legend ('raw data','base line') % plot the raw
data and the polynomial for illustration

Has anyone an idea of how to accomplish this? Are there standard
methods? I'd appreciate any hints.


Have you considered using convhull() in combination with polyfit(), or interp1() ?

Ah, I see, this should do the trick. Thanks!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]