Re: Interpolating arrays

• To: mathgroup at smc.vnet.net
• Subject: [mg83577] Re: Interpolating arrays
• From: Thomas E Burton <tburton at brahea.com>
• Date: Fri, 23 Nov 2007 05:35:30 -0500 (EST)

```By trial and error, I found that I could get a list-valued
interpolation function by enclosing the abscissa values in braces--in
your example,

Interpolation[{{{x1}, {a1, b1}},{{x2}, {a2, b2}},...,{{xi}, {ai,
bi}}...}]

Here is how I think Interpolation interprets the arguments a1 and b1
in four variations:

1. {x1, a1, b1}  (* a1 is the ordinate, b1 is its first derivative *)

2. (x1, {a1,b1}}  (* ditto *)

3. {{x1}, a1, b1}  (* {a1, b1} is a list-valued ordinate *)

4. {{x1}, {a1,b1}}  (* ditto*)

5. {{x1}, {{a1,b1}, {c1, d1}}}  (* {a1,b1,c1,d1} is a list-valued
ordinate *)

Behaviors 2, 3, & 5 differ from what the explanation of Interpolation
lead me to believe.

Tom

> ... Interpolation (according to the doc center) offers to construct
> an interpolating function given x values and f[x] values in the
> following format:
>
> Interpolation[{{x1, f1},{x2, f2},...{xi, fi}...]
>
> Down a few lines, doc center says: The fi can be lists or arrays of
> any dimension
>
> I'm interested in interpolating between 2D geometric points {a, b},
> and a naive form would be
>
> p = Interpolation[{{x1, {a1, b1}},{x2, {a2, b2}},...,{xi, {ai,
> bi}}...}], expecting to get a form where p[x] would return a 2D point.
>
> Too naive it seems, because it doesn't work. As far as I can
> determine, it returns only an Interpolation on a. How come? ...

```

• Prev by Date: Re: Discrepancy between Integrate and NIntegrate
• Next by Date: Re: Fast way of checking for perfect squares?
• Previous by thread: Re: Interpolating arrays
• Next by thread: Export figures with tooltips