interpolation 3+ variables and a datavector..

3 views (last 30 days)
Hi all I really need some help, with this little problem. :-)
I simply just need a way to make a linear/cubic interpolation in 3+ data variables (x,y,z,...) and get a interpolated result from another vector (r)
I've tried interpn and griddatan, but i couldn't get it to work..
lookup_point=[0.65,1,0.03]
x = 0.6000 0.2000 0.3000 0.5000 0.3000 0.6000 0.7000
y = 2 2 3 1 1 1 1
z = 0.1500 0.0200 0.0200 0.0300 0.0300 0.0200 0.0500
r = 222 333 442 324 532 100 200

Accepted Answer

Sean de Wolski
Sean de Wolski on 4 Dec 2013
%Data
x = [0.6000 0.2000 0.3000 0.5000 0.3000 0.6000 0.7000]
y = [2 2 3 1 1 1 1]
z = [0.1500 0.0200 0.0200 0.0300 0.0300 0.0200 0.0500]
r = [222 333 442 324 532 100 200]
lookup_point=[0.65,1,0.03]
% Build interpolant
SI = scatteredInterpolant(x',y',z',r')
SI(lookup_point) %use it

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!