BP神经网络 function [W,err]=BPTrain(data,label,hiddenlayers,nodes,type) %Train the bp artial nueral net work %input data,label,layers,nodes,type %data:dim*n %label:1*n %layers:m:number of hidden layers %nodes:num_1;num_2...num_m %type==1:create and train…