Can someone help me graph this function
Mostrar comentarios más antiguos
It's an Hyperboloid of 2 sheets ( -x^2/a^2 - y^2/b^2 + z^2/c^2 =1) Also if the equation =0 instead of 1 how would you change it? Thank you.
Respuesta aceptada
Más respuestas (1)
Roger Stafford
el 24 de Nov. de 2016
Editada: Roger Stafford
el 24 de Nov. de 2016
X = -2*a:.001*a:2*a;
Y = -2*b:.001*b:2*b;
Z1 = c*sqrt(1+X.^2/a^2+Y.^2/b^2);
Z2 = -c*sqrt(1+X.^2/a^2+Y.^2/b^2);
surf(X,Y,Z1)
hold on
surf(X,Y,Z2)
If a 0 is used instead of a 1, then make that substitution in the expressions for Z1 and Z2.
2 comentarios
Dante Truong
el 24 de Nov. de 2016
Roger Stafford
el 24 de Nov. de 2016
You have to specifically define all three quantities, a, b, and c in order to get a graph. You can't leave them as merely symbolic variables.
Categorías
Más información sobre Discrete Data Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
