I am using Matlab 2016a on a 64-bit Windows 7 Professional Machine. I have 132 input data as: [61.17;341.5600] [65.4800;328.2080] [64.8800;355.4050] and …….. and 120 output data as: 62352 95856 89124……. I generated a Closed-Loop NARX to predict the output data for input vectors X1(121:128). However, I am only able to simulate 120 outputs for 120 inputs and I cannot predict the future outputs using the valid inputs X1(121:128). I used the following code to simulate the outputs:
u1 = X1(1:90); % X1 is the input data
y1 = Y1(1:90); % Y1 is the output data
[p1,Pi1,Ai1,t1] = preparets(net_closed,u1,{},y1);yp1 = net_closed(p1,Pi1,Ai1);TS = size(t1,2);plot(1:TS,cell2mat(t1),'b',1:TS,cell2mat(yp1),'r')
the resulting graph is : How can I change my code to predict the outputs for inputs 120:128? Thank you in advance.
Best Answer