RMSE | Invalid Characters
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi
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
채택된 답변
Walter Roberson
2018년 5월 7일
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 is http://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.
추가 답변 (1개)
Yuvaraj Venkataswamy
2018년 5월 7일
편집: Walter Roberson
2018년 5월 7일
function r = RMSE(data,k)
Error=(data-k);
Squared_Error=Error.^2 ;
MSE=mean(Squared_Error);
r = sqrt(MSE);
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!