www.pudn.com > AllNeuralNetworkCompute.rar > BP_select.m, change:2005-07-11,size:581b


clear all; 
close all; 
figure(gcf) 
echo on 
clc 
p=-1:.1:1; 
t=[-.9602 -.5770 -.0729 .3771 .6405 .6600 .4609 .1336 -.2013 -.4344 -.5000 -.3930 -.1647 .0988 .3072 .3960 .3449 .1816 -.0312 -.2189 -.3201]; 
plot(p,t,'+'); 
title('ѵ'); 
xlabel('P'); 
ylabel('t'); 
S1=5; 
[w1,b1,w2,b2]=initff(p,S1,'tansig',t,'purelin'); 
echo off 
echo on  
clc 
df=10; 
me=8000; 
eg=0.03; 
lr=0.01 
tp=[df me eg lr]; 
[w1,b1,w2,b2,ep,tr]=trainbp(w1,b1,'tansig',w2,b2,'purelin',p,t,tp); 
pause  
clc 
ploterr(tr,eg); 
pause 
clc 
p=0.5; 
a=simuff(p,w1,b1,'tansig',w2,b2,'purelin') 
echo off