MSE and RMSE of a matrix
40 views (last 30 days)
I have a reference vector u of size 1x8. In this matrix the 1st four columns are voltage readings and last four columns are current readings.i.e.
u=[v1 v2 v3 v4 i1 i2 i3 i4];
Likewise I have another set of 100 vectors.The size of each of them is also 1x8. The nature of those vectors is also same like u i.e. 1st four columns are voltages and last four columns are currents in each of them. If I write those 100 vectors in a matrix called two. The size of the matrix two becomes 100x8. Now I find the difference between each of the row of matrix two and u. i.e.This gives me another matrix Error of size 100x8. i.e.
Now I want to find the MSE and RMSE of this matrix Error and plot both the MSE and RMSE.
KSSV on 3 Oct 2020
If yt and ye are the column vectors of theory and experimental values. You can get MSE, RMSE using:
e = (ye - yt) % Errors
suqre_e = (ye - yt).^2 % Squared Error
MSE = mean((ye - yt).^2) % Mean Squared Error
RMSE = sqrt(mean((ye - yt).^2)); % Root Mean Squared Error