Index exceeds the number of array elements
Show older comments
Coding details:-
Sample : 3x89 double
target_sample : 1x89 double
output : 1x209 double (training data)
output1 : 1x89 double (testing data)
My coding as follow:-
output1 =sim(net,sample);
r=corr2(output1,target_sample);
y=r;
[m,b,r]=postreg(target_sample,output1);
for n=1:size(output,2)
err(n)=[target_sample(n)-output1(n)].^2;
abs_error(n)=abs(target_sample(n)-output1(n));
end
rms_err=sqrt(sum(err,2)./101);
Command window shows error "Index exceeds the number of array elements (89)." how can i fix this?
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!