I am not sure, why it tell me the below has invalid characters.
function r = rmse(data,k)
r = sqrt(sum((data(:)-k(:)).^2)/numel(data))
end
Best Answer
Although you cannot see it, after the final bracket on the second line, and before the linefeed for that line, there is a character which in hex is 'feff', which ishttp://www.fileformat.info/info/unicode/char/FEFF/index.htm "Zero width no-break space"
It also happens to be the byte pair that would be used for UTF16 to indicate "Big Endian" byte order mark (BOM). But Zero Width No-Break Space is probably what happened to you rather than BOM.
You should convert data and estimate using double() as well. The RMSE function also contains a squared error calculation where any negative differences will be clipped to zero. Try:
Best Answer