MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

2D Interpolation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84999] 2D Interpolation
  • From: Andrew Watson <andrew.b.watson at nasa.gov>
  • Date: Tue, 22 Jan 2008 01:57:07 -0500 (EST)

I am trying to get a 2D interpolation over a set of irregularly 
spaced coordinates, and it seems not to work. The docs do not 
indicate a requirement that the coordinates be regularly spaced or 
form a grid, but the error message suggests it. Any suggestions? 
Clearly Matheamtica can get a reasonable surface, as when ListPlot3D is used.

Interpolation[{#[[{1, 2}]], #[[3]]} & /@ ggs[[3]]]

1/21/08 17:48:58 During evaluation of In[250]:= Interpolation::indim: \
The coordinates do not lie on a structured tensor product grid. >>

1/21/08 17:48:59 Out[250]= Interpolation[{{{56, 0},
    8.88233}, {{91, 0}, 9.60657}, {{139, 0}, 9.04204}, {{170, 0},
    8.81838}, {{212, 0}, 7.79813}, {{255, 0}, 6.1642}, {{0, 56},
    6.37119}, {{91, 56}, 9.18795}, {{139, 56}, 8.8417}, {{170, 56},
    8.59545}, {{212, 56}, 7.6863}, {{255, 56}, 6.12306}, {{0, 91},
    6.35401}, {{56, 91}, 7.47086}, {{139, 91}, 8.18413}, {{170, 91},
    8.45097}, {{212, 91}, 7.481}, {{255, 91}, 6.13182}, {{0, 139},
    6.41238}, {{56, 139}, 7.45331}, {{91, 139}, 7.96138}, {{170, 139},
    8.12068}, {{212, 139}, 7.34888}, {{255, 139}, 6.13999}, {{0, 170},
    6.34341}, {{56, 170}, 7.22625}, {{91, 170}, 7.51663}, {{139, 170},
    7.98614}, {{212, 170}, 7.65167}, {{255, 170}, 6.26857}, {{0, 212},
    6.46554}, {{56, 212}, 7.2998}, {{91, 212}, 7.62773}, {{139, 212},
    8.1553}, {{170, 212}, 7.96246}, {{255, 212}, 6.37176}, {{0, 255},
    6.53921}, {{56, 255}, 7.25474}, {{91, 255}, 7.62691}, {{139, 255},
    8.14141}, {{170, 255}, 7.7393}, {{212, 255}, 7.30612}}]


  • Prev by Date: Re: List complement operator
  • Next by Date: Re: Mathematica commenting of code using (* *) can't be nested
  • Previous by thread: Mathematica 6 messes up ArrayPlot PDF export
  • Next by thread: ndsolve pde+ode problem