- P=[5126.22 200.95 30.06 1304.43 932.14;
- 5649.93 204.41 29.80 1305.46 943.03;
- 5919.35 206.75 29.38 1306.58 953.03;
- 6213.24 206.90 29.09 1313.12 969.63;
- 6968.18 216.50 28.59 1321.63 986.16;
- 7656.96 227.61 28.06 1327.14 999.07;
- 8476.05 233.57 27.04 1334.23 1018.81;
- 11266.62 247.29 25.73 1341.77 1041.39]';
- T=[63.65 22.6 18.45;
- 67.74 23.6 18.35;
- 74.245 23.7 17.39;
- 76.12 17.55 14.39;
- 77.66 15.31 14.43;
- 77.54 13.71 15.03;
- 72.53 11.98 15.56;
- 70.60 15.57 15.56]';
- %输入向量的最大值和最小值
- threshold=[5000 20000;200 500;10 40;1300 1500;900 1300];
- net=newff(threshold,[20,3],{'tansig','logsig'},'trainlm');
- %训练次数为1000,训练目标为0.01,学习速率为0.1
- net.trainParam.epochs=300;
- net.trainParam.goal=0.01;
- LP.lr=0.1;
- net=train(net,P,T);
- p_test=[14017.51 248.89 24.57 1352.39 1097.60;
- 16876.78 236.78 23.76 1360.26 1108.65;
- 25667.47 263.28 20.76 1380.50 1125.36;
- 29517.60 272.76 19.85 1387.40 1130.99;
- 33945.23 282.58 18.98 1394.34 1136.64]';
- Y=sim(net,P_test);
- out=[Y]
复制代码
TRAINLM, Epoch 0/300, MSE 1957.36/0.01, Gradient 215841/1e-010
TRAINLM, Epoch 2/300, MSE 1891.8/0.01, Gradient 0/1e-010
TRAINLM, Minimum gradient reached, performance goal was not met.
??? Undefined function or variable 'P_test'.
|