i extracted this code from a pdf given at the bottom.
I gave my input and output files for training.
i am able to run all other codes except the last one.
I got error in load('run_log_2') and i do not know what it means.
%% network output
clear;
close all;
load('run_log_2');
nn=4;
ptrain=p(opt(nn).trainInd);
ttrain=t(:,tropt(nn).trainInd);
esttrain=sim(netopt{nn},ptrain);
ptest=p(:,tropt(nn).testInd);
ttest=t(:,tropt(nn).testInd);
esttest=sim(netopt{nn},ptest);
pval=p(:,tropt(nn).valInd);
tval=t(:,tropt(nn).valInd);
estval=sim(netopt{nn},pval);
estwhole=sim(netopt{nn},p);
figure;
plot(ttrain,esttrain,'.b');
figure;
plot(tval,estval,'.g');
figure;
plot(ttest,estttest,'.r');
figure;
plot(t,estwhole,'.k');
figure;
plotregression(ttrain,esttrain,'Train',tval,estval,'Validation',ttest,esttest,'Test',t,estwhole,'Whole Data');
Please help me!!

댓글 수: 3

Jakob B. Nielsen
Jakob B. Nielsen 2020년 3월 10일
Do you have a file named "run_log_2" in the same folder that the matlab script runs from? What does your error message say?
Ameer Hamza
Ameer Hamza 2020년 3월 10일
Since you are copying code from the pdf file, most probably, you don't have the file run_log_2. Your best bet is to request the author of the paper to provide you the file.
Siva  Sankari
Siva Sankari 2020년 3월 10일
I got this error message and i don't have any file as run_log_2
Error using load
Unable to read file 'run_log_2'. No such file or directory.
Error in test (line 4)
load('run_log_2');

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Files and Folders에 대해 자세히 알아보기

질문:

2020년 3월 10일

댓글:

2020년 3월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by