Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

interpolation and plotting 3d data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44672] interpolation and plotting 3d data
  • From: Michael Alfaro <malfaro at ucsd.edu>
  • Date: Thu, 20 Nov 2003 03:16:37 -0500 (EST)
  • References: <200307120919.FAA29502@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,

I have a list of 3D data that is not uniformly spaced (obtained through 
monte carlo sampling).  Is it possible to interpolate a function across 
the range of the sampled points and plot the interpolated 3d function?

A sample of the data in the table (allpoints) looks like this:

{{0.19, 0.54, 0.39}, {0.19, 0.6, 0.34}, {0.19, 0.64, 0.31}, {0.19,
      1.04, 0.29}, {0.19, 1.07, 0.31}, {0.2, 0.54, 0.39}, {
   0.2, 0.59, 0.35}, {0.2, 0.63, 0.32}, {0.2, 0.66, 0.3}, {0.2, 0.69,
      0.28}, {0.2,
   1, 0.28}, {0.2, 1.03, 0.3}, {0.2, 1.06, 0.32}, {0.2, 1.09,
     0.34}, {0.21, 0.47, 0.45}, {0.21, 0.54, 0.39}, {0.21,
    0.62, 0.33}, {0.21, 0.65, 0.31}, {0.21, 1, 0.3}, {0.21, 1.02, 0.31}, 
{0.21,
    1.05, 0.33}, {0.21, 1.08, 0.35}, {0.22, 0.53, 0.4}, {
     0.22, 0.66, 0.31}, {0.22, 0.68, 0.3}, {0.22, 0.7, 0.29}, {0.22,
     0.92, 0.28}, {0.22, 0.95, 0.29} }

I had something in mind like:

  f[x_, y_, z_] = Interpolation[Flatten[allpoints, 1]]
tabdata = Table[f[x, y, z ], {x, 0.25, 0.7,
       0.05}, {y, 0.3, 1.1, 0.1}, {z, 0.3, 1.1, 0.1}]
ListPlot3D[tabdata]

but must be missing something important because I can't get a plot out 
of Mathematica.  Would someone please help me with the correct use of 
interpolation for 3d data? Also, is another plot type more appropriate? 
Thanks for any help!

Michael


  • Prev by Date: Re: How to include a constraint in NonlinearFit?
  • Next by Date: Re: Re: Improper integral
  • Previous by thread: RE: Mesh generation in 2D
  • Next by thread: Re: interpolation and plotting 3d data