P=[1.0000 1.0000 1.0000 1.0000 1.0000 ;
0.0000 0.8823 0.0000 1.0000 0.0000 ;
0.9910 0.0176 0.9230 0.0000 0.8174 ;
1.0000 1.0000 0.9030 1.0000 0.9588 ;
1.000 0.8823 0.0000 1.0000 0.0071;
0.0000 0.9223 0.0000 1.0000 0.0000;
0.0020 0.8823 0.0437 1.0000 0.1582;
1.0000 0.8823 0.3569 1.0000 0.6622;
0.9535 0.0963 0.0009 0.5386 0.0593;
1.0000 0.9983 0.0000 1.0000 0.0000;
];
P=P'
T=[1.0000 0.0000 0.0000 0.0000 0.0000 ;
0.0000 1.0000 0.0000 0.0000 0.0000 ;
0.0000 0.0000 1.0000 0.0000 0.0000 ;
0.0000 0.0000 0.0000 1.0000 0.0000 ;
0.0000 0.0000 0.0000 0.0000 1.0000 ;
0.0000 0.0000 1.0000 1.0000 0.0000 ;
0.0000 1.0000 1.0000 0.0000 0.0000;
0.0000 0.0000 0.0000 1.0000 0.0000;
0.0000 0.0000 1.0000 1.0000 0.0000;
0.0000 0.0000 0.0000 1.0000 1.0000
];
T=T'
net=newff(minmax(P),[8,1],{'tansig','purelin'},'traingda');
net.trainParam.show = 50;
net.trainParam.lr = 0.05;
net.trainParam.lr_inc = 1.08;
net.trainParam.lr_dec = 0.6;
net.trainParam.epochs = 2000;
net.trainParam.goal = 9.5238e-004; % sse=0.02
[net,tr]=train(net,P,T)
P =
Columns 1 through 8
1.0000 0 0.9910 1.0000 1.0000 0 0.0020 1.0000
1.0000 0.8823 0.0176 1.0000 0.8823 0.9223 0.8823 0.8823
1.0000 0 0.9230 0.9030 0 0 0.0437 0.3569
1.0000 1.0000 0 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 0 0.8174 0.9588 0.0071 0 0.1582 0.6622
Columns 9 through 10
0.9535 1.0000
0.0963 0.9983
0.0009 0
0.5386 1.0000
0.0593 0
T =
1 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 1 0 0 0
0 0 1 0 0 1 1 0 1 0
0 0 0 1 0 1 0 1 1 1
0 0 0 0 1 0 0 0 0 1
??? Error using ==> network.train
Targets are incorrectly sized for network.
Matrix must have 1 rows.
现在行列一样了,问题还在,怎么解决啊,谢谢