Advertisement
Guest User

Untitled

a guest
May 20th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.17 KB | None | 0 0
  1. z = [-1:0.1:1]
  2. theta = [0:pi/18:2*pi];
  3. [Z, T] = meshgrid(z, theta)
  4.  
  5. R = sqrt((1-Z.^2)./(0.25*cos(T).^2 + sin(T).^2))
  6. X = R.*cos(T)
  7. Y = R.*sin(T)
  8. mesh(X,Y,Z)
  9. axis equal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement