matlab 画个半径为2的圆 x=-2:0.1:2; y=sqrt(4-x.^2); plot(x,y,x,-y) 为啥图看起来像椭圆呢?

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/27 15:08:08

matlab 画个半径为2的圆 x=-2:0.1:2; y=sqrt(4-x.^2); plot(x,y,x,-y) 为啥图看起来像椭圆呢?

这是因为Matlab绘制时的X轴和Y轴单位长度不等,在后面加上 axis equal 即可.