ListPlot3D不起作用但ListPointPlot3D不起作用(Mathematica)

Pro*_*_UK 1 3d wolfram-mathematica list

下面的代码有效,但当我用ListPlot3D替换ListPointPlot3D时,它不起作用!

这有效:

ListPointPlot3D[Transpose[Table[{i,j, (150*(Sin[((i - 90)*2*3.14)/180]^2)* (Sin[((j - 45)*2*3.14)/180]^2)) - 150}, {i, 0, 270, 5}, {j, 0, 270, 5}]]]
Run Code Online (Sandbox Code Playgroud)

这不起作用:

ListPlot3D[Transpose[Table[{i,j, (150*(Sin[((i - 90)*2*3.14)/180]^2)* (Sin[((j - 45)*2*3.14)/180]^2)) - 150}, {i, 0, 270, 5}, {j, 0, 270, 5}]]]
Run Code Online (Sandbox Code Playgroud)

任何想法为什么它不起作用?

And*_*lan 6

你的数据:

In[1]:= Dimensions[
 Transpose[
  Table[{i, 
    j, (150*(Sin[((i - 90)*2*3.14)/180]^2)*(Sin[((j - 45)*2*3.14)/
           180]^2)) - 150}, {i, 0, 270, 5}, {j, 0, 270, 5}]]]

Out[1]= {55, 55, 3}
Run Code Online (Sandbox Code Playgroud)

但是ListPlot3D想要一个三元组列表,所以Flatten 1级:

ListPlot3D[
 Flatten[Transpose[
   Table[{i, 
     j, (150*(Sin[((i - 90)*2*3.14)/180]^2)*(Sin[((j - 45)*2*3.14)/
            180]^2)) - 150}, {i, 0, 270, 5}, {j, 0, 270, 5}]], 1]]
Run Code Online (Sandbox Code Playgroud)

因此Transpose是多余的,所以这将做:

ListPlot3D[
 Flatten[Table[{i, 
    j, (150*(Sin[((i - 90)*2*3.14)/180]^2)*(Sin[((j - 45)*2*3.14)/
           180]^2)) - 150}, {i, 0, 270, 5}, {j, 0, 270, 5}], 1]]
Run Code Online (Sandbox Code Playgroud)

同时,对于这个例子,如何改变Plot3D:

Plot3D[(150*(Sin[((i - 90)*2*3.14)/180]^2)*(Sin[((j - 45)*2*3.14)/
        180]^2)) - 150, {i, 0, 270}, {j, 0, 270}]
Run Code Online (Sandbox Code Playgroud)