Borrar filtros
Borrar filtros

graphing inplicit quadric equations

6 visualizaciones (últimos 30 días)
SonOfAFather
SonOfAFather el 31 de Ag. de 2012
I am trying to graph five different quadric surfaces and don't know the name of them. the idea is to see the shame and name them. that being said is there a keyword in matlab that allows the input of a equation and the output is a graph of the 3d surface. I know that I can use plot3(x,y,z,) but this is not really helpful when I can't input the equation as it is given.
the one of the equations is as follows:
y^2=z^2-x^2+1

Respuesta aceptada

Dishant Arora
Dishant Arora el 1 de Sept. de 2012
It would'v been a lot easier if we were able to express the function explicitly, but since it cant be expressed explicitly, we must parameterize it and in this case parameterization takes the following form
x=sqrt(1+z^2)*cos(phi)
y=sqrt(1+z^2)*sin(phi)
once you are done with parameterization, you can plot it like shown below:
[phi, Z] = meshgrid((0:0.1:2)*pi, (-2:0.1:2));
X=sqrt(1+Z.^2).*cos(phi);
Y=sqrt(1+Z.^2).*sin(phi);
surf(X, Y, Z);

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by