Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: interpolate
Date: Wed, 13 Aug 2008 13:06:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 35
Message-ID: <g7um7q$bem$1@fred.mathworks.com>
References: <g6uq9n$b2p$1@fred.mathworks.com> <g6v2t9$n4$1@fred.mathworks.com> <g6vcoa$peq$1@fred.mathworks.com> <g709d7$eq$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1218632762 11734 172.30.248.37 (13 Aug 2008 13:06:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 13 Aug 2008 13:06:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1338633
Xref: news.mathworks.com comp.soft-sys.matlab:485245



"John D'Errico" <woodchips@rochester.rr.com> wrote in
message <g709d7$eq$1@fred.mathworks.com>...
> "Dave Brackett" <davebrackett@hotmail.com> wrote in message 
> <g6vcoa$peq$1@fred.mathworks.com>...
> 
> > I am only specifying the peak coordinates and that the y 
> > coord is 0 between each peak. I want to generate the data 
> > points between each peak and 0 to get something similar to 
> > the plot in the picture. 
> 
> I'll show some mercy. Assuming that you
> don't really want to get 0 in between...
> 
> k = .1;
> coef = exp(-abs(bsxfun(@minus,x,x')*k))\y;
> xev = 0:1500;
> pred = exp(-abs(bsxfun(@minus,xev',x')*k))*coef;
> plot(xev,pred)
> 
> You can pick the value of k that gives you
> the shape you want to see. I still don't see
> why you want it, but thats your problem.
> 
> John

Indeed the plot in the picture does not go exactly to zero,
but as I said in the first post, the picture shows the 'kind
of thing' I want. It is actually unimportant in this case
whether it completely reaches zero or not. It just needs to
get close.

Thank you both for your help with this, I can achieve what I
need now.