MATLAB运行错误:Error using plot Vectors must be the same lengths.i=0;for x=0:0.1:2i=i+1;y(i)=final([0.002,x,2]);endx=0:0.1:2plot(x,y)Error using plot Vectors must be the same lengths.

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 13:40:24

MATLAB运行错误:Error using plot Vectors must be the same lengths.i=0;for x=0:0.1:2i=i+1;y(i)=final([0.002,x,2]);endx=0:0.1:2plot(x,y)Error using plot Vectors must be the same lengths.
MATLAB运行错误:Error using plot Vectors must be the same lengths.
i=0;
for x=0:0.1:2
i=i+1;
y(i)=final([0.002,x,2]);
end
x=0:0.1:2
plot(x,y)
Error using plot Vectors must be the same lengths.

MATLAB运行错误:Error using plot Vectors must be the same lengths.i=0;for x=0:0.1:2i=i+1;y(i)=final([0.002,x,2]);endx=0:0.1:2plot(x,y)Error using plot Vectors must be the same lengths.
向量x、y的长度不一样,你看看workspace中x、y的长度,可能是你的final函数的问题