do I have find the test data points corresponding to the points in the reference data and then use the goodnessOfFit function. I will have to round off the data and then calculate the fit).
Yes, buddy..! Seems like you have to do it in the hard way! :/
But instead of simply rounding off, you can find the two points in the test data just before and after the corresponding reference sample point. Then use linear interpolation to guess the value corresponding to the reference point.
Or easier, there is a resample
function in Matlab which would resample your test data to match your reference data. This would work if the reference data have a constant sample interval.
All the best!