Calculating Mean Square Error
130 次查看(过去 30 天)
显示 更早的评论
What will be the code of the function for calculating Mean Square Error
3 个评论
Christy Lentz
2017-2-27
What happens when the returned value is NaN? I'm using 2 arrays of observational measurements and then simulation measurements and trying to find the MSE, but upon using this algorithm I get a NaN back.
Image Analyst
2017-2-28
What do you want to do when there's a nan. You know there is a 'omitnans' option to mean() don't you?
采纳的回答
Image Analyst
2014-4-20
OK so we know the desired signal, at least you could if you made up the equation for it. But what is the actual signal? Do you have that in some array, perhaps that you read in from some kind of position sensor or image analysis? To calculate MSE you need to have two signals - the desired/true signal, and your actual/test signal. Then just do
MSE = mean((desired - mean).^2);
5 个评论
Image Analyst
2014-5-9
Mick, not sure what your recent edit was, but if I helped you could you mark the answer as "Accepted"? Thanks.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulation, Tuning, and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!