Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#9 |
高级会员
注册日期: 2008-11-07
住址: 湖南长沙
帖子: 233
声望力: 21 ![]() |
![]()
a=input('请输入圆心横坐标(例如 -2):');
b=input('请输入圆心纵坐标(例如 3):'); for n=1:1:10 t=linspace(-pi,pi); x=sin(t)*sqrt(0.02*n)+a; y=cos(t)*sqrt(0.02*n)+b; plot(x,y) hold on axis equal end for n=1:2:9 t=linspace(-pi,pi); x0=sin(t)*sqrt(0.02*n)+a; x1=sin(t)*sqrt(0.02*(n+1))+a; t=x0:0.01:x1; y0=cos(t)*sqrt(0.02*n)+b; y1=cos(t)*sqrt(0.02*(n+1))+a; s=y0:0.01:y1; plot(t,s,'b') hold on end 这样应该可以了,你把那个对应于每个圆环中的点拿出来,然后绘成黑色的点图就可以了。
__________________
坚持就是胜利,努力就有奇迹。 |
![]() |
![]() |