I am trying to predict the future movements on some points but I am quite inexperienced and I get the above error. I am using matlab R2015a. Thanks in advance. Below is my code:
inputDelays = 1:6:19; % input delay vector
hiddenSizes = [6 3]; % network structure (number of neurons)
net = narnet(inputDelays,hiddenSizes);
[Xs,Xi,Ai,Ts] = preparets(net,{},{},yt);
net = train(net,Xs,Ts,Xi,Ai);
view(net)
net = closeloop(net);
view(net);
yini = yt(end-max(inputDelays)+1:end); % initial values from training data
[Xs,Xi,Ai] = preparets(net,{},{},[yini yv]);
predict = net(Xs,Xi,Ai);
Yv = cell2mat(yv);
Yp = cell2mat(predict);
e = Yv - Yp;
figure(1)
plot(Nu+1:N,Yp,'r')
plot(Nu+1:N,e,'g')
legend('validation data','training data','sampling markers',...
'prediction','error','location','southwest')

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 5월 7일

0 개 추천

Check if you have a Neural Network Toolbox

댓글 수: 2

lori wewe
lori wewe 2016년 5월 7일
편집: lori wewe 2016년 5월 7일
Do I necessarily have do download it from their website, can't I do it from matlab, I found this link: http://www.mathworks.com/products/neural-network/
Azzi Abdelmalek
Azzi Abdelmalek 2016년 5월 7일
If you haven't this toolbox, you need to by it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2016년 5월 7일

댓글:

2016년 5월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by