Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#6 |
普通会员
注册日期: 2009-02-22
帖子: 91
声望力: 18 ![]() |
![]()
不知下程序可否:
a=input('请输入圆心横坐标(例如 -2):'); b=input('请输入圆心纵坐标(例如 3):'); for n=10:-1:1 t=linspace(-pi,pi); x=sin(t)*sqrt(0.02*n)+a; y=cos(t)*sqrt(0.02*n)+b; if rem(n,2)==0 fill(x,y,'k'); elseif rem(n,2)==1 fill(x,y,'w') end hold on axis equal end 希望有帮助!! |
![]() |
![]() |