Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Interpolating between 2 columns
Date: Mon, 25 Feb 2008 17:31:02 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 26
Message-ID: <fpuu0m$247$1@fred.mathworks.com>
References: <fpus0u$pgs$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
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 1203960662 2183 172.30.248.37 (25 Feb 2008 17:31:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 25 Feb 2008 17:31:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:453536



"Jason " <j_henderson44@REMOVEhotmail.com> wrote in message 
<fpus0u$pgs$1@fred.mathworks.com>...
> Hello,
> 
> I have two columns of data
> 
> X1 = 20 21 22 23 at 2
> 
> X2 = 30 31 32 33 at 3
> 
> I want the column of data at 2.5. I'm not sure how to obtain
> this using interp commands. 
> 
> Thanks in advance.

Z = [10 11 12 13;20 21 22 23;30 31 32 33]';

z25 = interp2(1:3,1:4,Z,2.5,1:4)
z25 =
    25
    26
    27
    28

HTH,
John