程序出错
我的程序出了错误,请高人指点,谢谢p=[3.4109 1.1288 0.733 0.9048 5.1385 4.9887 2.5583 2.0981;
3.1833 1.0901 0.6409 0.9042 4.8868 4.8535 2.5192 2.0126;
3.3481 1.1304 0.7132 0.9506 5.2341 4.816 2.446 2.074;
1.8909 0.6552 0.3802 0.8624 3.3682 2.9782 1.4426 1.4667;
3.4665 1.1475 0.7364 0.9061 5.1129 4.9609 2.5592 2.1024;
3.176 1.0855 0.6482 0.9094 4.8779 4.8679 2.5195 2.0044;
3.3469 1.1295 0.7187 0.9506 5.2417 4.8337 2.4362 2.0746;
1.8973 0.6528 0.3784 0.8661 3.3569 2.9745 1.4536 1.4664;
3.4351 1.1386 0.7327 0.9006 5.155 4.9692 2.5516 2.1014];
t=[000;
001;
010;
100;
000;
001;
010;
100;
000];
threshold=;
net=netff(threshold,,{‘tansig’,‘logsig’},‘trainlm’);
net.trainParam.epochs=1000;
net.trainParam.goal=0.01;
LP.1r=0.1;
net=train(net,p,t);
p_test=[3.4351 1.1386 0.7327 0.9006 5.155 4.9692 2.5516 2.1014;
3.1833 1.0886 0.6491 0.9082 4.87 4.8605 2.5189 2.0035;
3.3401 1.1401 0.722 0.9546 5.256 4.8312 2.4384 2.081];
Y=sim(net,p_test)
[ 本帖最后由 eight 于 2007-4-17 15:50 编辑 ] 原帖由 蓝血人 于 2007-4-17 15:46 发表
我的程序出了错误,请高人指点,谢谢
p=[3.4109 1.1288 0.733 0.9048 5.1385 4.9887 2.5583 2.0981;
3.1833 1.0901 0.6409 0.9042 ...
请先阅读置顶贴,然后再把你的问题重新整理上来 试一下吧,可以运行了
p=[3.4109 1.1288 0.733 0.9048 5.1385 4.9887 2.5583 2.0981;
3.1833 1.0901 0.6409 0.9042 4.8868 4.8535 2.5192 2.0126;
3.3481 1.1304 0.7132 0.9506 5.2341 4.816 2.446 2.074;
1.8909 0.6552 0.3802 0.8624 3.3682 2.9782 1.4426 1.4667;
3.4665 1.1475 0.7364 0.9061 5.1129 4.9609 2.5592 2.1024;
3.176 1.0855 0.6482 0.9094 4.8779 4.8679 2.5195 2.0044;
3.3469 1.1295 0.7187 0.9506 5.2417 4.8337 2.4362 2.0746;
1.8973 0.6528 0.3784 0.8661 3.3569 2.9745 1.4536 1.4664;
3.4351 1.1386 0.7327 0.9006 5.155 4.9692 2.5516 2.1014]';
t=[000;
001;
010;
100;
000;
001;
010;
100;
000]';
threshold=;
net=newff(threshold,,{'tansig','logsig'},'trainlm');
net.trainParam.epochs=1000;
net.trainParam.goal=0.01;
net.trainParam.lr=0.1;
net=train(net,p,t);
p_test=[3.4351 1.1386 0.7327 0.9006 5.155 4.9692 2.5516 2.1014;
3.1833 1.0886 0.6491 0.9082 4.87 4.8605 2.5189 2.0035;
3.3401 1.1401 0.722 0.9546 5.256 4.8312 2.4384 2.081]';
Y=sim(net,p_test)
页:
[1]