Student Support Forum
-----
Student Support Forum: 'Interpolation 3D' topicStudent Support Forum > General > Archives > "Interpolation 3D"

< Previous CommentHelp | Reply To Comment | Reply To Topic | Post New Topic
Author Comment/Response
Gopinath Venkatesan
06/26/08 3:16pm

Dami

I don't know if this is what you are looking for.

xpoints = {1, 2, 3, 4};
ypoints = {1, 2, 3, 4};
funval = {{1, 2, 3, 4}, {2, 2, 6, 4}, {3, 6, 3, 4}, {4, 4, 12, 4}};
gridxy = {xpoints, ypoints};
intpfun[x_, y_] := ListInterpolation[funval, gridxy][x, y];
intpfun[2.5, 2.5]
Plot3D[intpfun[x, y], {x, 1, 4}, {y, 1, 4}]

The above intpfun[2.5,2.5] gives 4.23 which is different from your previous value (3.95).

By setting order of interpolation in the ListInterpolation, i.e., intpfun[x_, y_] := ListInterpolation[funval, gridxy,InterpolationOrder->{2,2}][x, y];

you can get 3.5.

Hope it helps.

Gopinath

URL: ,

Subject (listing for 'Interpolation 3D')
Author Date Posted
Interpolation 3D dami 06/24/08 3:47pm
Re: Interpolation 3D Gopinath Ven... 06/26/08 3:16pm
< Previous CommentHelp | Reply To Comment | Reply To Topic | Post New Topic





 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: