|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
p=[0 452.489 118 3.3344 12.7861;
5.43 2920.658 741 4.0021 15.7743;
7.68 5546.767 1312 3.5051 14.8186;
11.46 5461.617 1384 3.7118 14.6477;
3.19 5523.835 1365 3.9657 16.0481;
1.33 2948.432 854 3.0113 10.3965;
1.44 2665.319 515 2.876 14.8846;
0.51 2047.274 672 4.522 13.7764;
10.56 5869.804 947 2.8862 17.8896;
2.36 4514.143 1266 3.501 12.4835;
46.2 7494.088 1879 3.235 12.9022;
7.52 8099.29 2061 3.6617 14.3897;
2.92 10216.07 2593 2.9896 11.7787;
10.38 10500.55 2996 3.1268 10.9588;
7.97 1833.322 785 2.9144 6.8063];
for i=1:5
P(i,:)=(p(i,:)-min(p(i,:)))/(max(p(i,:))-min(p(i,:)));
end
t=[1508.76;11688.74;19441.96;20272.39;21905.65;8878.61;7665.57;9257.73;16941.31;15804.11;24243.23;29657.21;30542.27;32832.59;5342.95];
for i=1:1
T(i,:)=(t(i,:)-min(t(i,:)))/(max(t(i,:))-min(t(i,:)));
end
net=newff(minmax(P),[12,1],{'tansig','purelin'},'trainlm');
net.trainParam.epochs=500;
net.trainParam.goal=1e-7;
net.trainParam.Ir=0.0001;
[net,tr]=train(net,P,T);
a=sim(net,P)
请问这个程序到底怎么错了?
怎么解决这两个问题?
Warning: Divide by zero.
(Type "warning off MATLAB:divideByZero" to suppress this warning.)
??? Error using ==> network/train
Targets are incorrectly sized for network.
Matrix must have 1 rows. |
|