How to define my TestRows,Testinput and Testoutput?

Hi, I don't know why my TestRows,Testinput and Testoutput are all empty matrix? Can help me explain?
[x, minx, maxx] = premnmx ([900:70:1600; 150:45:600; 200:50:700]); [y, miny, maxy] = premnmx ([0:0.1:1]);
Input = x'; Output = y'; trainn = 11; Train = randperm (size (Input, 1))'; TrainRows = Train (1:trainn); Traininput = Input (TrainRows,:); Trainoutput = Output (TrainRows,:); TestRows = Train (trainn+1:end); Testinput = Input (TestRows,:); Testoutput = Output (TestRows,:); a = Traininput'; b = Trainoutput'; g = Testinput'; h = Testoutput'; net = newff(minmax(a),[11,1],{'tansig','purelin'},'trainbr'); net = init(net); net.trainParam.show = 100; net.trainParam.epochs = 5000; net.trainParam.goal = 0; [net,tr] = train(net,a,b);
c = sim (net,a); d = sim (net,g);

1 件のコメント

per isakson
per isakson 2013 年 12 月 12 日
編集済み: per isakson 2013 年 12 月 12 日
The button [{}Code] could make your code readable!
Obsolete Functions: premnmx as of R2006a according to the release notes.

サインインしてコメントする。

回答 (0 件)

質問済み:

2013 年 12 月 12 日

編集済み:

2013 年 12 月 12 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by