1个回答
展开全部
%%%%%%%%%圆%%%%%%%%%%%%%%
x=-1:0.00001:1;
r=1;%半径r=1
y1=sqrt(r-x.^2);
y2=-sqrt(r-x.^2);
plot(x,y1,x,y2)
%%%%%%%%%椭圆%%%%%%%%%%%%%%
x=-1:0.00001:1;
a=1;b=1;%椭圆半径a=1;b=1
y1=sqrt(b.^2*(1-x.^2/(a.^2)));
y2=-sqrt(b.^2*(1-x.^2/(a.^2)));
plot(x,y1,x,y2)
%%%%%%%%%抛物线%%%%%%%%%%%%%%
x=1:0.00001:5;
a=1;b=1;%抛物半径a=1;b=1
y1=sqrt(b.^2*(x.^2/(a.^2)-1));
y2=-sqrt(b.^2*(x.^2/(a.^2)-1));
plot(x,y1,x,y2)
%%%%%%%%%椭球面%%%%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
a=1;b=1;c=1;% 假设a=1;b=1;c=1
z1=sqrt(c.^2*(1-x.^2/(a.^2)+y.^2/(b.^2)));
z2=-sqrt(c.^2*(1-x.^2/(a.^2)+y.^2/(b.^2)));
mesh(x,y,z1)
hold on;
mesh(x,y,z2)
%%%%%%%%%%%单叶双曲面%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
a=1;b=1;c=1;% 假设a=1;b=1;c=1
z1=sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)-1));
z2=-sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)-1));
mesh(x,y,z1)
hold on;
mesh(x,y,z2)
%%%%%%%%%%双叶双曲面%%%%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
a=1;b=1;c=1;% 假设a=1;b=1;c=1
z1=sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)+1));
z2=-sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)+1));
mesh(x,y,z1)
hold on;
mesh(x,y,z2)
%%%%%%%%%%椭圆抛物面%%%%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
p=1;q=1;% 假设p=1;q=1
z=0.5*(x.^2/p+y.^2/q);
mesh(x,y,z)
%%%%%%%%%%双曲抛物面%%%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
p=1;q=1;% 假设p=1;q=1
z=0.5*(x.^2/p-y.^2/q);
mesh(x,y,z)
x=-1:0.00001:1;
r=1;%半径r=1
y1=sqrt(r-x.^2);
y2=-sqrt(r-x.^2);
plot(x,y1,x,y2)
%%%%%%%%%椭圆%%%%%%%%%%%%%%
x=-1:0.00001:1;
a=1;b=1;%椭圆半径a=1;b=1
y1=sqrt(b.^2*(1-x.^2/(a.^2)));
y2=-sqrt(b.^2*(1-x.^2/(a.^2)));
plot(x,y1,x,y2)
%%%%%%%%%抛物线%%%%%%%%%%%%%%
x=1:0.00001:5;
a=1;b=1;%抛物半径a=1;b=1
y1=sqrt(b.^2*(x.^2/(a.^2)-1));
y2=-sqrt(b.^2*(x.^2/(a.^2)-1));
plot(x,y1,x,y2)
%%%%%%%%%椭球面%%%%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
a=1;b=1;c=1;% 假设a=1;b=1;c=1
z1=sqrt(c.^2*(1-x.^2/(a.^2)+y.^2/(b.^2)));
z2=-sqrt(c.^2*(1-x.^2/(a.^2)+y.^2/(b.^2)));
mesh(x,y,z1)
hold on;
mesh(x,y,z2)
%%%%%%%%%%%单叶双曲面%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
a=1;b=1;c=1;% 假设a=1;b=1;c=1
z1=sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)-1));
z2=-sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)-1));
mesh(x,y,z1)
hold on;
mesh(x,y,z2)
%%%%%%%%%%双叶双曲面%%%%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
a=1;b=1;c=1;% 假设a=1;b=1;c=1
z1=sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)+1));
z2=-sqrt(c.^2*(x.^2/(a.^2)+y.^2/(b.^2)+1));
mesh(x,y,z1)
hold on;
mesh(x,y,z2)
%%%%%%%%%%椭圆抛物面%%%%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
p=1;q=1;% 假设p=1;q=1
z=0.5*(x.^2/p+y.^2/q);
mesh(x,y,z)
%%%%%%%%%%双曲抛物面%%%%%%%%%%%%%
xa=-2:0.2:2;
ya=xa;
[x,y]=meshgrid(xa,ya);
p=1;q=1;% 假设p=1;q=1
z=0.5*(x.^2/p-y.^2/q);
mesh(x,y,z)
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询