Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: interp3 interpolation
Date: Sat, 5 Dec 2009 20:34:20 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 17
Message-ID: <hfeg4c$eef$1@fred.mathworks.com>
References: <hfcbi7$4eq$1@fred.mathworks.com> <hfdkgp$8nr$1@fred.mathworks.com> <hfdmmj$ql5$1@fred.mathworks.com> <hfeena$fhb$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1260045260 14799 172.30.248.38 (5 Dec 2009 20:34:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 5 Dec 2009 20:34:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:590520

"Aditya Gupta" <adityargupta@gmail.com> wrote in message <hfeena$fhb$1@fred.mathworks.com>...
> Thanks for the reply. The MATLAB doc says 
> X=1:N, Y=1:M, Z=1:P where [M,N,P]=size(V). 
> Regarding the XI, YI and ZI MATLAB doc says:
> XI,YI, ZI must be arrays of the same size, or vectors. Vector arguments that are not the same size, and have mixed orientations (i.e. with both row and column vectors) are passed through meshgrid to create the Y1, Y2, Y3 arrays.
> 

Mix orientation: an example
XI = 1:3
YI = (4:5).'
ZI = 6:7

There are two rows vectors and one column vector. In your case they are all rows. All rows/columns are interpreted as a long list of scattered data, so they must have the same length.

Just flip one then, or generate same size array with ndgrid.

Bruno