how to calculate mean square error ?
4 views (last 30 days)
Show older comments
Hello to everyone. I extracted the histogram of the data I have. I wrote this code for it.
I want to calculate mean square error to see its compatibility. If I did it with histfit, I would write a code like this
However, I don't know how to calculate the mean square error because I fit manually. I would be very happy if you could help with this.
3 Comments
Image Analyst
on 11 Jul 2021
I know that. But did you see my comment? Read it again. You still have not attached your data and I'm not about to recreate it manually from a bar chart. Please give it to us in a .mat file with the paperclip icon.
Answers (1)
Sulaymon Eshkabilov
on 11 Jul 2021
You have already computed in the last line of the code. Maybe you meant root mean square error. If so,
MSE = mean(fit_err.^2); % Mean square error
RMSE = sqrt(MSE); % Root mean square error
See Also
Categories
Find more on Histograms 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!