matlabR2021b
1 clc
2 clear
3 p= xlsread('test_R')';
4 t=xlsread('test_RFF')';
5 [pn,minp,maxp,tn,mint,maxt]=premnmx(p,t);
6 test=xlsread('test_L')';
7 astest=xlsread('test_LFF')';
8 [testx,mintest,maxtest,astest,minastest,maxastest]=premnmx(test,astest);
9 net=newelm(minmax(pn),[17,1],{'tansig','purelin'});
10 net.trainparam.epochs=10000;
11 net.trainparam.show=20;
12 net=init(net);
13 [net,ty]=train(net,pn,tn);
14 y=sim(net,testx);
15 error=y-astest;
16 oil=postmnmx(y,mint,maxt);
17 astest=postmnmx(astest,mint,maxt);
18 la=1:7744;
19 plot(la,oil,'r');
20 hold on;
21 plot(la,astest,'g');
22 figure;
23 plot(la,error,'b');
警告: NEWELM used in an obsolete way.
位置:nnerr.obs_use (第 17 行)
位置: newelm>create_network (第 128 行)
位置: newelm (第 103 行)
位置: elman_old (第 9 行)
See help for NEWELM to update calls to the new argument list.