0

So I've been able to make a list given by

list = Table[{xValues, f[xValues, t (*fixed*)]}, {xValues, xmin, xmax}]

For example:

list = 
 Table[{x, Sin[x/(2*Pi)*1/10]*Cos[1/(2*Pi)]}, {x, 1, 10}]

this list is easily plotted with the command ListPlot[list] (or even ListLinePlot if I wanted some kind of interpolation between my points).

Now if I go to the 3D-case it becomes slightly harder! So I again make my list of data, this time given by:

Plotdata = 
 Table[{x, y, Sin[x/(2*Pi)*1/10]*Cos[y/(2*Pi)*1/10]}, {x, 1, 10}, {y, 
   1, 10}]

This now gives me a nested list, and my attempt to plot it with ListPlot3D is futile. I'm wondering if I need to do something special to get this done? My goal would be to get a nice 3D-plot of the whole.

I know I could do it for my example with the regular Plot3D command, but that's just an example, the real case involves a lot of functions which can't be done by the plot-command (or would demand to much time). My problem comes essentially down to the above. I'm hoping someone could help me.

Jacob Akkerboom
  • 12,215
  • 45
  • 79
Nick
  • 437
  • 3
  • 13

1 Answers1

1

I have extended your range for illustrative purposes. Two ways:

Plot3D[Sin[x/(2*Pi)*1/10]*Cos[y/(2*Pi)*1/10], {x, 1, 100}, {y, 1, 
  100}]
ListSurfacePlot3D[
 Partition[
  Flatten@Table[{x, y, Sin[x/(2*Pi)*1/10]*Cos[y/(2*Pi)*1/10]}, {x, 1, 
     100, 1}, {y, 1, 100, 1}], 3], Mesh -> 10, 
 MeshFunctions -> {#1 &, #2 &}, BoxRatios -> {1, 1, 0.6}, 
 PlotRange -> All, MaxPlotPoints -> 100]

enter image description here

ubpdqn
  • 60,617
  • 3
  • 59
  • 148