Plot a elliptic cone

조회 수: 14 (최근 30일)
Huy Hoang Huynh Nguyen
Huy Hoang Huynh Nguyen 2020년 8월 23일
답변: KSSV 2020년 8월 23일
Hello there, I have this given equations of elliptic cone x^2 + 4*y^2 = z^2 and now I want to plot it.
I have try this but it seems to be incorrect.
f = @(x,y,z) x.^2 + 4*y.^2 - z.^2
fimplicit3(f,[-100,100])
How can I plot that function? Thanks in advance.

채택된 답변

madhan ravi
madhan ravi 2020년 8월 23일

추가 답변 (1개)

KSSV
KSSV 2020년 8월 23일
I can plot a ellipse like this:
x = linspace(-2,2) ;
y = linspace(-2,2) ;
m = 100 ; n = 100 ;
theta = linspace(0,2*pi,m);
R = linspace(0,8,n) ;
[T R] = meshgrid(theta,R) ;
% Convert grid to cartesian coordintes
X = R.*cos(T) ;
Y = R.*sin(T) ;
Z = R ;
surf(X,Y,Z)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by