How can I put this MSE equation into MATLAB?
2 views (last 30 days)
Show older comments
3 Comments
Answers (1)
DGM
on 28 Oct 2021
Edited: DGM
on 28 Oct 2021
You could use immse(), or you can do it manually:
A = randi(100,10,1);
B = A + randn(10,1);
% use immse()
mse1 = immse(A,B)
% do the same thing
err = double(A)-double(B); % just in case the inputs are integer-class
mse2 = mean(err(:).^2)
EDIT:
I just noticed that's not what the paper is asking for. I have no idea what that expression is supposed to be, but it's not the MSE afaik. Either I'm stupid (it's not uncommon), or someone tried to write the expression for the RMS error and messed it up. Maybe there's some missing context that explains the discrepancy.
This is MSE:
This is RMSE:
I don't know what this is:
Anyone is free to explain what I'm missing.
1 Comment
Rik
on 29 Oct 2021
Good catch. My guess is that this was an attempt at the RMSE. I didn't even notice it wasn't before.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!