注册 登录
编程论坛 Matlab

[求助]问题解决

shncoco 发布于 2007-06-22 14:29, 642 次点击

谢谢

[此贴子已经被作者于2007-6-27 15:55:22编辑过]

1 回复
#2
abingchem2007-06-24 10:59
?theta=0:0.01:2*pi;
?b=10;
?a=1;
?r=b-a:0.1:b+a;
?x=r'*cos(theta);
?y=r'*sin(theta);
?zp=real(sqrt(a^2-(sqrt(x.^2+y.^2)-b).^2));
?surf(x,y,zp)
?hold on
?surf(x,y,-zp)
?axis equal
1