How to do multi step prediction by using NARXNET

3 views (last 30 days)
I am using this code for multistep prediction. whether it is write or wrong i cant understand.
clc close all
[X,T]=maglev_dataset;
x1=X(1:100); t1=T(1:100); x2=X(21:120); %x2=num2cell(rand(1,100)); net = narxnet(1:5,1:5,10); [x,xi,ai,t] = preparets(net,x1,{},t1); net = train(net,x,t,xi,ai); [y1,xf,af] = net(x,xi,ai);
[netc,xi,ai] = closeloop(net,xf,af); [y2,xf,af] = netc(x2,xi,ai);

Answers (0)

Community Treasure Hunt

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

Start Hunting!