# Table for 3D list plot

I have a function which is defined with an integral and a sum, in other words, its numerical, so i want to make a table (nxm) with the following entries:

data={{x1,y1,f[x1,y1]},{x1,y2,f[x1,y2],{x2,y2,f[x2,y2],...,{xn,ym,f[xn,ym]}


Is there an easy way of achieving this? Thanks!

## 1 Answer

f[x_, y_] := Sin[x y]
ListPlot3D@ Flatten[Table[{x, y, f[x, y]}, {x, 0, 2 Pi, 2 Pi/50}, {y, 0, 2 Pi, 2 Pi/50}], 1]


• Thank you, the flatten was the thing i was missing. – Josh Nov 19 '14 at 19:58