Created
February 12, 2018 10:18
-
-
Save snowman/dd5a7d2ef7a76eff0b1fcd5b9d5dc00b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
theta = linspace(0, 2*pi, 40); | |
phi = linspace(0, pi, 40); | |
[theta, phi] = meshgrid(theta, phi); | |
rho=1; | |
x = rho * sin(phi) .* cos(theta); | |
y = rho * sin(phi) .* sin(theta); | |
z = rho * cos(phi); | |
mesh(x, y, z); | |
axis equal | |
grid on | |
box on | |
view([130,30]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment