Question: Just Getting Started with NARX NN

9 views (last 30 days)
John Henley
John Henley on 2 Dec 2017
Answered: Greg Heath on 3 Dec 2017
Hi.
Just getting into the NN Toolbox. I have an error with PREPARETS that I don't full understand.
Context of the environment: inputs--> 4x1500 and outputs--> 1x1500
x=inputs;
t=outputs;
net = narxnet(1:2,1:2,10,'open','trainbr')
[X,Xi,Ai,T] = preparets(net,x,{},t);
net = train(net,X,T,Xi,Ai);
view(net)
Y = net(X,Xi,Ai)
perf = perform(net,Y,T)
Error:
Index exceeds matrix dimensions.
Error in preparets (line 293) xi = xx(:,FBS+((1-net.numInputDelays):0));
Error in cup (line 5) [X,Xi,Ai,T] = preparets(net,x,{},t);
Since I'm starting out with the NNTOOL box, I wanted go simple. It surprised me that I get an error with the simple example code referenced in the help guide.
My gut says that I have not aligned the default function inputs with the array size of my data.
But I'm open to feedback and steer from others.
Thanks

Answers (1)

Greg Heath
Greg Heath on 3 Dec 2017
IN ORDER OF PREFERENCE, the best way to get help is
1a. Demonstrate with the MATLAB help or doc dataset example
help narxnet
doc narxnet
or a minor modification (e.g., 4 inputs)
1b. Demonstrate with one of the additional MATLAB example datasets
help nndatasets
doc nndatasets
or a minor modifcation
1c. Demonstrate with your own DOWNLOADED dataset
2. Use as few modifications in the help/doc documentation code as possible.
Otherwise, help is not guaranteed.
Hope this helps.
Greg

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!