Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: interpolate
Date: Sat, 2 Aug 2008 00:23:03 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 22
Message-ID: <g709d7$eq$1@fred.mathworks.com>
References: <g6uq9n$b2p$1@fred.mathworks.com> <g6v2t9$n4$1@fred.mathworks.com> <g6vcoa$peq$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
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 1217636583 474 172.30.248.35 (2 Aug 2008 00:23:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 2 Aug 2008 00:23:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:483232



"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