matlab的Vectors must be the same lengths.错误
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/04 03:29:40
matlab的Vectors must be the same lengths.错误
这个是我编写的一段程序,报了Vectors must be the same lengths错误,
>> t=0:0.01:10;
>> y=randn(size(t));
>> yn=sin(y);
>> p=y(1:30);
>> t=yn(1:30);
>> net=newff(minmax(p),[4,1],{'tansig','purelin'},'trainlm');
>> net.trainParam.show=10;
>> net.trainParam.epochs=1000;
>> net.trainParam.goal=0.001;
>> net.trainParam.lr=0.01;
>> [net,tr]=train(net,p,t);
>> figure(1);
>> plotperf(tr);
>> a=sim(net,p);
>> figure(2);
>> plot([0:0.01:29],t,'-+',[0:0.01:2.9],a,'-*');
这个是我编写的一段程序,报了Vectors must be the same lengths错误,
>> t=0:0.01:10;
>> y=randn(size(t));
>> yn=sin(y);
>> p=y(1:30);
>> t=yn(1:30);
>> net=newff(minmax(p),[4,1],{'tansig','purelin'},'trainlm');
>> net.trainParam.show=10;
>> net.trainParam.epochs=1000;
>> net.trainParam.goal=0.001;
>> net.trainParam.lr=0.01;
>> [net,tr]=train(net,p,t);
>> figure(1);
>> plotperf(tr);
>> a=sim(net,p);
>> figure(2);
>> plot([0:0.01:29],t,'-+',[0:0.01:2.9],a,'-*');
最后一行 plot([0:0.01:29],t,'-+',[0:0.01:2.9],a,'-*');
一个是29 一个是2.9 ,或许是输入失误.
再问: 都改成29还是不对呀
再答: [0:0.01:29] 共2901个元素, a和t都只有30个元素,用plot命令时 2者不匹配。
一个是29 一个是2.9 ,或许是输入失误.
再问: 都改成29还是不对呀
再答: [0:0.01:29] 共2901个元素, a和t都只有30个元素,用plot命令时 2者不匹配。
matlab的Vectors must be the same lengths.错误
matlab plot 提示错误:Vectors must be the same lengths!
matlab中错误vectors must be the same lengths 是怎么回事?
哪位大侠知道这个MATLAB的错误啊 plot Vectors must be the same lengths.
为什么matlab程序老是报 plot Vectors must be the same lengths.的错误?..
matlab问题Vectors must be the same lengths.
matlab运行遇到问题:Vectors must be the same lengths.
matlab提示“Vectors must be the same lengths.
跪等!matlab中Vectors must be the same lengths
MATLAB运行错误:Error using plot Vectors must be the same lengths
matlab总是显示Vectors must be the same lengths,请大师帮忙,
求matlab高手~Error using plot Vectors must be the same lengths问