how to plot this data?

前端 未结 2 613
孤城傲影
孤城傲影 2021-01-28 13:14

I have an array of values for theta and phi. How can I easily create a MATLAB plot where theta and phi are spherical coordina

相关标签:
2条回答
  • 2021-01-28 13:48

    Can you try this:

    [X, Y, Z] = sph2cart(theta, phi, P);
    plot3(X, Y, Z)
    

    Then use [Rotate 3D] button to rotate it to better looking.

    0 讨论(0)
  • 2021-01-28 13:52

    try this: [X, Y, Z] = sph2cart(theta, phi, R); Which R is the radius of your sphere and here is R = sqrt(sum(P.^2)); Then plot it like: scatter3(X,Y,Z);

    0 讨论(0)
提交回复
热议问题