p=[8.0000e+001 1.5225e+001 2.9640e+001 3.1000e+002;...
8.0000e+001 1.4925e+001 3.0360e+001 3.3000e+002;...
8.1200e+001 1.5000e+001 2.9880e+001 3.1000e+002;...
8.1200e+001 1.5225e+001 3.0120e+001 3.3000e+002;...
8.1200e+001 1.4925e+001 3.0000e+001 2.9000e+002;...
7.8800e+001 1.4775e+001 2.9640e+001 2.9000e+002;...
8.0000e+001 1.4775e+001 3.0120e+001 2.7000e+002;...
8.0000e+001 1.5075e+001 2.9880e+001 2.9000e+002;...
8.0400e+001 1.5225e+001 3.0360e+001 2.7000e+002;...
7.9600e+001 1.5075e+001 3.0120e+001 3.0000e+002;...
8.0400e+001 1.5075e+001 3.0360e+001 3.1000e+002;...
7.9600e+001 1.5000e+001 2.9640e+001 3.3000e+002;...
7.8800e+001 1.5225e+001 2.9880e+001 3.0000e+002;...
8.1200e+001 1.5075e+001 2.9640e+001 2.7000e+002;...
8.0400e+001 1.4925e+001 2.9640e+001 3.0000e+002;...
7.9600e+001 1.4775e+001 3.0000e+001 3.1000e+002;...
8.0400e+001 1.5000e+001 3.0120e+001 2.9000e+002;...
7.8800e+001 1.5075e+001 3.0000e+001 3.3000e+002;...
8.0400e+001 1.4775e+001 2.9880e+001 3.3000e+002;...
8.1200e+001 1.4775e+001 3.0360e+001 3.0000e+002;...
7.9600e+001 1.4925e+001 2.9880e+001 2.7000e+002;...
8.0000e+001 1.5000e+001 3.0000e+001 3.0000e+002;...
7.8800e+001 1.5000e+001 3.0360e+001 2.7000e+002;...
7.8800e+001 1.4925e+001 3.0120e+001 3.1000e+002;...
7.9600e+001 1.5225e+001 3.0360e+001 2.9000e+002]';
for i=1:4
p(i,:)=(p(i,:)-min(p(i,:)))/(max(p(i,:))-min(p(i,:)));
end
t=[4.0323e+002...
4.0785e+002...
3.9056e+002...
4.1669e+002...
3.6175e+002...
3.6966e+002...
3.3439e+002...
3.6955e+002...
3.4638e+002...
3.7896e+002...
3.8555e+002...
4.2437e+002...
3.8849e+002...
3.4558e+002...
3.8226e+002...
3.8690e+002...
3.6303e+002...
4.2114e+002...
4.1218e+002...
3.6510e+002...
3.4181e+002...
3.7800e+002...
3.3751e+002...
3.9168e+002...
3.6534e+002];
u=t;
for i=1:1
t(i,:)=(t(i,:)-min(t(i,:)))/(max(t(i,:))-min(t(i,:)));
end
net=newff(minmax(p),[5,1],{'tansig','logsig'},'trainlm');
net.trainParam.lr=0.01;
net.trainParam.epochs=1000;
net.trainParam.goal=0.001;
net=train(net,p,t);
out=sim(net,p);
for i=1:25
predict(i)=out(i)* (max(u(1,:))-min(u(1,:)))+ min(u(1,:));
end
predict
err=predict-u |