## calculate the mean square error

### Guido Pastore (view profile)

on 15 Mar 2019
Latest activity Commented on by Adam

on 18 Mar 2019
Given two arrays of double how do I calculate the mean square error

### Tags

on 15 Mar 2019

Calculate the error, square it and calculate the mean!
mean( ( a - b ).^2 );

Show 1 older comment

on 15 Mar 2019
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

### Guido Pastore (view profile)

on 15 Mar 2019
How can I interpolate values ??
I'll explain my situation to you.
I have two arrays.
1.The first array comes from a data acquisition performed through Kinect which has a higher acquisition frequency, in fact the size of this array is 1054x1.
2.The second array comes from a data acquisition performed through an Intel RealSense camera that has a lower acquisition frequency, in fact the size of this array is 601x1.
How can I solve the problem and then proceed to the calculation of the mean square error??