x = -pi:pi/1000:pi;y = sin(x);plot(y)
显示的x值不是输入的x值
plot(x,y)才会对应到x轴,只plot(y)会默认x轴取1,2,3...
x = -pi:pi/1000:pi; y = sin(x); plot(x,y)