📄 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 + -