Re: 3D interpolating
- To: mathgroup at smc.vnet.net
- Subject: [mg109153] Re: 3D interpolating
- From: "Hans Michel" <hmichel at cox.net>
- Date: Wed, 14 Apr 2010 05:15:30 -0400 (EDT)
- References: <hq0mlv$jsb$1@smc.vnet.net>
Try
data = {{{0, 0}, 0}, {{1, 1}, 1}, {{2, 2}, 2}};
f = ListInterpolation[data[[All, 1]], InterpolationOrder -> 1]
You may need use Sort or SortBy on data if column 2 is not well ordered
Because your sample does not have enough points without
InterpolationOrder ->1 you would order too high warning. See:
ref/message/ListInterpolation/inhr
Hans
"michuco" <ibmichuco at hotmail.com> wrote in message
news:hq0mlv$jsb$1 at smc.vnet.net...
> Hi all,
>
> I am trying to fit a series of 3D points, say
>
> data = {{{0, 0}, 0}, {{1, 1}, 1}, {{2, 2}, 2}};
>
> with
>
> f = Interpolation[data]
>
> which gives me the error
>
> Interpolation::indim: The coordinates do not lie on a structured \
> tensor product grid.
>
> I think that I got the data format wrong, but I can't tell from the
> Help library of Mathematica 6.
>
> Ideas? Thanks in advance,
>
> Michuco
>