作业帮 > 综合 > 作业

为什么matlab程序老是报 plot Vectors must be the same lengths.的错误?..

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/05/06 12:49:58
为什么matlab程序老是报 plot Vectors must be the same lengths.的错误?..
t=0:0.01:1;
[t,x,y]=sim('orange',2)
plot(t,y);
maxy=max(y) %求响应的最大值
ys=y(length(t)) %求响应的终值
pos=(maxy-ys)/ys %求取超调量
grid
ys=y(length(t)) %求响应的终值
L=length(t);
while(y(L)>0.98*ys)&(y(L)
为什么matlab程序老是报 plot Vectors must be the same lengths.的错误?..
可能是orange.mdl模型中没有输出端口Out1吧?所以y的值不对.