Check out example codes for "rmse matlab". It will help you in understanding the concepts better.

Code Example 1

(y - yhat)    % Errors
(y - yhat).^2   % Squared Error
mean((y - yhat).^2)   % Mean Squared Error
RMSE = sqrt(mean((y - yhat).^2));  % Root Mean Squared Error

Learn ReactJs, React Native from akashmittal.com