フィルターのクリア

graphing inplicit quadric equations

1 回表示 (過去 30 日間)
SonOfAFather
SonOfAFather 2012 年 8 月 31 日
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

採用された回答

Dishant Arora
Dishant Arora 2012 年 9 月 1 日
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);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by