calculate the mean square error
显示 更早的评论
Given two arrays of double how do I calculate the mean square error
回答(1 个)
Adam
2019-3-15
Calculate the error, square it and calculate the mean!
mean( ( a - b ).^2 );
4 个评论
Guido Pastore
2019-3-15
Adam
2019-3-15
Yes, otherwise what are you calculating errors between? The errors are per point - you need a value and a value to compare it with for each point. If you don't have that then you can either throw away points that don't have a matching value or potentially interpolate values to compare them with, but that depends very much on the situation - 'inventing' data is not a great idea in many situations.
Guido Pastore
2019-3-15
编辑:Guido Pastore
2019-3-15
Adam
2019-3-18
doc interp1
should allow you to resample the 601 up to 1054 (or the 1054 down to 601 if you prefer) and then you can compare per-point, bearing in mind that you are no longer comparing raw data.
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!