Plot a elliptic cone
13 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
更多回答(1 个)
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)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!