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

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/10 16:43:09
matlab 画个半径为2的圆 x=-2:0.1:2; y=sqrt(4-x.^2); plot(x,y,x,-y) 为啥图看起来像椭圆呢?

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

matlab 画个半径为2的圆 x=-2:0.1:2; y=sqrt(4-x.^2); plot(x,y,x,-y) 为啥图看起来像椭圆呢?
这是因为Matlab绘制时的X轴和Y轴单位长度不等,在后面加上 axis equal 即可.