求单叶双曲面和双叶双曲面、椭圆抛物面、双曲抛物面用matlab怎么画或其参数方程?有个例子就成,选修可的实验报告.大一高数学的不太好,现在乘机补课.
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/23 08:14:02
求单叶双曲面和双叶双曲面、椭圆抛物面、双曲抛物面用matlab怎么画或其参数方程?有个例子就成,选修可的实验报告.大一高数学的不太好,现在乘机补课.
求单叶双曲面和双叶双曲面、椭圆抛物面、双曲抛物面用matlab怎么画或其参数方程?
有个例子就成,选修可的实验报告.大一高数学的不太好,现在乘机补课.
求单叶双曲面和双叶双曲面、椭圆抛物面、双曲抛物面用matlab怎么画或其参数方程?有个例子就成,选修可的实验报告.大一高数学的不太好,现在乘机补课.
花画圆的程序:
for i=-3:0.001:3
y=-sqrt(9-i^2);
plot(i,y);
hold on
end
hold on
for i=-3:0.001:3
y=sqrt(9-i^2);
plot(i,y);
hold on
end
%椭圆
for i=-6:0.01:6
y=-sqrt(36-i^2)/2;
plot(y,i);
hold on
end
%双曲线
for i=-6:0.01:6
y=-sqrt(36+i^2)/2;
plot(y,i);
hold on
end
hold on
for i=-6:0.01:6
y=sqrt(36+i^2)/2;
plot(y,i);
hold on
end
hold on
for i=-6:0.01:6
y=sqrt(36-i^2)/2;
plot(y,i);
hold on
end
%抛物线
for i=0:0.01:6
y=-sqrt(2*6*i);
plot(y,i);
hold on
end
hold on
for i=0:0.01:6
y=sqrt(2*6*i);
plot(y,i);
hold on
end
%%%%%%%%%圆%%%%%%%%%%%%%%
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
全部展开
%%%%%%%%%圆%%%%%%%%%%%%%%
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)
收起
啊啊啊啊啊啊