MATLAB: RMSE between original and predicted values.
MATLABrmse model
Hi,
If I have thousand samples of my signal in a vector form like 1*1000, and I will predict my signal at each iteration that results into 1*1000 also. Then In this case, how will I find the RMSE of my model?
‘RMSE’ of course means ‘root mean squared error’, or the square root of the mean of the squared error.
The simplest code for this is then:
V1 = rand(10,1);
V2 = rand(10,1);
RMSE = sqrt(mean((V1-V2).^2));
where the error is(V1-V2), and‘.^2’ denotes element-wise squaring of the error (the difference between‘V1’ and‘V2’). The rest of the expression takes themean of the squared differences, andsqrt takes the square root, completing the definition.
Best Answer