?? kongtiao.m
字號:
P=[0.4413 0.4707 0.6953 0.8133 0.4379 0.4677 0.6981 0.8002 0.4517 0.4725 0.7006 0.8201;
0.4379 0.4677 0.6981 0.8002 0.4517 0.4725 0.7006 0.8201 0.4557 0.4790 0.7019 0.8211;
0.4517 0.4725 0.7006 0.8201 0.4557 0.4790 0.7019 0.8211 0.4601 0.4811 0.7101 0.8298]';
T=[0.4557 0.4790 0.7019 0.8211;
0.4601 0.4811 0.7101 0.8298;
0.4612 0.4845 0.7188 0.8312]';
threshold=[0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1];
a=[11 17 23];
p_test=[0.4557 0.4790 0.7019 0.8211 0.4601 0.4811 0.7101 0.8298 0.4612 0.4845 0.7188 0.8312]';
t=[0.4615 0.4891 0.7201 0.8330];
for i=1:3
net=newelm(threshold,[a(i),4],{'tansig','purelin'});
net.trainParam.epochs=1000;
net=init(net);
net=train(net,P,T);
y=sim(net,p_test);
error(i,:)=y'-t;
%有問題
end
hold off;
figure;
plot(1:4,error(1,:));
hold on;
plot(1:4,error(2,:),'-');
hold on;
plot(1:4,error(3,:),'--');
hold off;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -