Hello
I would like your help for this problem that has been bothering me for quite some time.
So, I want to plot the Monte Carlo Simulation of the Root Mean Square Error (RMSE) between a parameter and an estimated parameter
I've written the attached code which was easy enough but the problem is that the plot seems off. From what I know RMSE is supposed to decrease with the number of simulations not oscillate like this.
What I am doing wrong ? And what to do to have a correct plot ?
Thanks in advance
Here's the code :
param = 1 ;
paramest = 1.2 ;
N = 1000;
for n = 1:N
y = param*rand(1,N);
yest = paramest*rand(1,N);
RMSE(n) = sqrt(mean((y - yest).^2));
end
plot(RMSE)
3 Comments
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/673758-rmse-plot-of-monte-carlo-simulation#comment_1176573
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/673758-rmse-plot-of-monte-carlo-simulation#comment_1176573
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/673758-rmse-plot-of-monte-carlo-simulation#comment_1176613
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/673758-rmse-plot-of-monte-carlo-simulation#comment_1176613
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/673758-rmse-plot-of-monte-carlo-simulation#comment_1176633
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/673758-rmse-plot-of-monte-carlo-simulation#comment_1176633
Sign in to comment.