error when using closeloop

1 view (last 30 days)
jun
jun on 10 May 2014
I ran into questions when I use closeloop to make prediction. I search around the related previous questions which help me understand NARX more, but I still haven't get things figured out. Here is my problem, the code I use is as follows:
net = narxnet(1:3,1:3,10);
[x,xi,ai,t] = preparets(net,L,{},P);
net2 = train(net,x,t,xi,ai);
[y1,xf,af] = net2(x,xi,ai);
[netc,xi,ai] = closeloop(net2,xf,af);
[y2,xf,af] = netc(L1,xi,ai);
the data is in the attachment.
I always get the errors like when run the command closeloop,
Error using mat2cell (line 107) Input arguments, D1 through D2, must sum to each dimension of the input matrix size, [1 1].'
Error in nnet7.process_fcn (line 26) if (wasCell), out1 = mat2cell(out1,ii,jj); end
Error in removeconstantrows (line 41) y = nnet7.process_fcn(mfilename,x,varargin{:});
Error in closeloop (line 182) ai = feval(fcn,'apply',ai,settings);
One interesting thing I found is that the error is depend on the contents of dataset P, if I change some value of this, sometimes the error won't show up. What is the reasons for this?Thanks so much in advance for looking into this problem.

Answers (0)

Categories

Find more on Sequence and Numeric Feature Data Workflows 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!