跪求matlab画太极程序,源代码和截图发到邮箱294150209@qq.com,会追加分的。谢谢!
clc
clear
theta=linspace(0,2*pi);
x=linspace(-4,4);
x=linspace(-4,4);
y=sqrt(16-x.^2);
s=area(x,y)
set(s,'facecolor','w','edgecolor','k')
hold on
s=area(x,-y)
set(s,'facecolor','k','edgecolor','k')
x=linspace(0,4);
y=-sqrt(4-(x-2).^2);
s=area(x,y)
set(s,'facecolor','w','edgecolor','none')
x=linspace(-4,0);
y=sqrt(4-(x+2).^2);
s=area(x,y)
set(s,'facecolor','k','edgecolor','none')
r=0.37
s=area(r*cos(theta)-2,r*sin(theta)-0.5);
set(s,'facecolor','w','edgecolor','none')
s=area(r*cos(theta)+2,r*sin(theta)-0.5);
set(s,'facecolor','k','edgecolor','none')
axis equal
axis off
参考资料: http://blog.sina.com.cn/s/blog_6fe967840100ms1u.html