Matlab中用surf作图双叶双曲面,怎么做
Matlab中用surf作图双叶双曲面,怎么做
日期:2022-02-10 15:09:41 人气:1
[x,y]=meshgrid(-10:0.2:10);
a=1;b=2;c=3;% 假设a=1;b=2;c=3
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