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$>
References: <hfcbi7$4eq$> <hfdkgp$8nr$> <hfdmmj$ql5$> <hfeena$fhb$>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1260045260 14799 (5 Dec 2009 20:34:20 GMT)
NNTP-Posting-Date: Sat, 5 Dec 2009 20:34:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: comp.soft-sys.matlab:590520

"Aditya Gupta" <> wrote in message <hfeena$fhb$>...
> 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.