%% RefPlotresponse
% This example shows how to use a NARX network to solve a time series problem.
%% code

[X,T] = simplenarx_dataset;
net = narxnet(1:2,20);
[Xs,Xi,Ai,Ts] = preparets(net,X,{},T);
net = train(net,Xs,Ts,Xi,Ai);
Y = net(Xs,Xi,Ai);
plotresponse(Ts,Y)

% Copyright 2015 The MathWorks, Inc.