How to make the estimation error and average it correctly?
Show older comments
Is the code correct for the whole part especially the estimation error and average error part?
Accepted Answer
More Answers (1)
KALYAN ACHARJYA
on 12 Dec 2020
It seems the code considering the mean error for the last experiment iteration. You may same the E of all experiment and later get the error. Here E as array.
E=zeros(1,10); %preallocation
for experiment = 1:10
.......
E(experiment)=(errM).^2;
%....^
end
Em=mean(E);
disp(['Em=' num2str(Em)]);
Categories
Find more on Loops and Conditional Statements 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!