作业帮 > 综合 > 作业

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

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/19 15:05:04
为什么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)
可能是orange.mdl模型中没有输出端口Out1吧?所以y的值不对.