MATLAB 对应画正多变形

来源:互联网 发布:我的世界编程代码 编辑:程序博客网 时间:2024/06/06 06:36


%画多边形function t=test3(n)n=n+1;theta=linspace(0,2*pi,n);thetaD=1;X_C=0;Y_C=0;plot(D*cos(theta)+X_C,D*sin(theta)+Y_C,'g-')disp(D*cos(theta)+X_C);disp(D*sin(theta)+Y_C)grid onaxis square

>> test3(4)

theta =

         0    1.5708    3.1416    4.7124    6.2832

    1.0000    0.0000   -1.0000   -0.0000    1.0000

         0    1.0000    0.0000   -1.0000   -0.0000



0 0