function psobp % BP neural network trained by PSO algorithm % Copyright by Deng Da-Peng @ 2005 % Email: rexdeng@163
com % You can change and distribute this code freely for academic usage % Business usage is strictly prohibited clc clear all AllSamIn=
; % Add your all input data AllSamOut-
; % Add your all output data % Pre-processing data with premnmx, you can use other functions global minAllSamOut; global maxAllSamOut; [AllSamInn,minAllSamIn,maxAllSamIn,AllSamOutn,minAllSamOut,maxAllSamOut] = premnmx(AllSamIn,AllSamOut); % draw 10 percent from all samples as testing samples,the rest as training samples i=[10:10:1000]; TestSamIn=[]; TestSamOut=[]; for j=1:100 TestSamIn=[TestSamIn,AllSamInn(:,i(j))]; TestSamOut=[TestSamOut,AllSamOutn(:,i(j))]; end TargetOfTestSam=
; % add reall outp