Path: news.mathworks.com!not-for-mail
From: "Branko " <bogunovic@mbss.org>
Newsgroups: comp.soft-sys.matlab
Subject: Re: interp3
Date: Wed, 4 Nov 2009 11:22:02 +0000 (UTC)
Organization: National Institute of Biology
Lines: 25
Message-ID: <hcro4q$122$1@fred.mathworks.com>
References: <hcrl6a$1h06$1@news01.tp.hist.no>
Reply-To: "Branko " <bogunovic@mbss.org>
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 1257333722 1090 172.30.248.38 (4 Nov 2009 11:22:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 11:22:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 237386
Xref: news.mathworks.com comp.soft-sys.matlab:582325


Kamran <kamran@uio.no> wrote in message <hcrl6a$1h06$1@news01.tp.hist.no>...
> 
> Hi,
> having difficulty to use interp3 func.
> I have a:
> [xs,ys,zs]=meshgird(-180:180,0:90,0:.01:1);
> and vectors nx,ny,nz which I convert to sherical coordinates:
> [t,p,r]=cart2sph(nx,ny,nz);
> and corresponding vector 'v' with values at (t,p,r), and then
> 
> vi=interp3(xs,ys,zs,v,t,p,r);
> 
> and I get the error that 'v' must be a matrix with size equal to my 
> meshgrid. Well, if I knew the 'v' at every point on my mesh, I wouldn't 
> have needed to find the values on the mesh itself.
> Is there any other function available that would do the job for me ? I 
> need to test 'cubic' and 'spline' interpolation on my 3D data (huge 
> dataset).
> 
> thanks,
> Kamran

Have you looked at griddata.

Branko