www.pudn.com > Classify.rar > feasible_3.m, change:2009-07-27,size:258b


P = [-2 -1 1 2;1.5 1 0.5 -1]; 
T = [0 0 1 1]; 
net = newp([-2 2;-2 2]);%建立网络 
handle = plotpc(net.iw{1},net.b{1}); 
net.trainParam.epochs = 30; 
net = train(net,P,T);%网络训练 
figure; 
plotpv(P,T); 
handle = plotpc(net.iw{1},net.b{1},handle);%画出分界线