Question
Hi, is there a way to use neural network toolbox to predict the next value in a time series?
Related Questions
Expert Answer
Neeta Dsouza
PhD Expert
Answered Aug 18, 2026
- Override 'dividerand' to obtain constant intervals between points. For example
net.divideFcn = 'divideblock'
2. Obtain the final states Xf,Af from training
[ net tr Ys Es Xf Af] = train(net,Xs,Ts,Xi,Ai); %Ys = net(Xs,Xi,Ai); %Es = gsubtract(Ts,Ys);
3. You have to know the new initial state conditions Xinew, Ainew to predict points after the original data; Then
Ynew = net(NaN(n),Xinew,Yinew))
will yield n predictions. If Xinew,Ainew = Xf,Af, then Ynew is a gapless contnuation of Ys.
Have a different question? Ask here