Path: news.mathworks.com!not-for-mail
From: "Per Sundqvist" <sunkan@fy.chalmers.se>
Newsgroups: comp.soft-sys.matlab
Subject: Re: interpolating/smoothing w/ monotonically increasing
Date: Thu, 30 Oct 2008 23:12:02 +0000 (UTC)
Organization: Chalmers Tekniska H&#246;gskola
Lines: 23
Message-ID: <gedf02$101$1@fred.mathworks.com>
References: <ged003$oi7$1@fred.mathworks.com> <ged11r$f59$1@fred.mathworks.com> <ged2vl$ep1$1@fred.mathworks.com> <ged7g2$ki3$1@fred.mathworks.com>
Reply-To: "Per Sundqvist" <sunkan@fy.chalmers.se>
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 1225408322 1025 172.30.248.35 (30 Oct 2008 23:12:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 30 Oct 2008 23:12:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 266682
Xref: news.mathworks.com comp.soft-sys.matlab:498136


"Pete sherer" <tsh@abg.com> wrote in message <ged7g2$ki3$1@fred.mathworks.com>...
> Wow - Thank you so much John for solving the problem.  Amazing!!
> 
.
Hi, it looks that your data could be fitted to the monotonic functions atan or erf:
.
%
fun=@(c,x) c(1)+c(2)*erf((x-c(3))/c(4))
%fun=@(c,x) c(1)+c(2)*atan((x-c(3))/c(4))
%
options=optimset('TolX',1e-12,'TolFun',1e-12);
cc0=[391.6603  223.1656    0.5792    0.2257];
cc=lsqcurvefit(fun,cc0,[x(1)' x(3:end)'],[y(1)' y(3:end)'],...
    [],[],options)
cc0=cc;
xx=linspace(min(x),max(x),200);
yy=fun(cc,xx);
plot(x,y,'o',xx,yy);
%
%note that I removed point 2
/Per