how to calculate and plot rmse matrix

5 次查看(过去 30 天)
Hi,im a beginner in matlab. I need to plot for a rmse matrix. i need to calculate the rmse and reshape it into a heatmap (a 8x5 matrix). How do I calculate the rmse of 40 models and one observation? i have listed out my models in the code, and am retrieving it from 'odat' for observation and 'gdat' for the 40 models. i've looked through all the rmse commands but i couldn't really understand, so need some help on it.
  4 个评论
Adam Danz
Adam Danz 2022-9-29
Have you explored rmse, introduced in MATLAB R2022b?
Fariz Syafiq Mohamad Ali
yes. i've tried using the E = rmse(F,A), but it only gives one value of rmse. How do i make sure i get values for all the models?

请先登录,再进行评论。

采纳的回答

KSSV
KSSV 2022-10-2
编辑:KSSV 2022-10-2
Let O be your observation data array of size mX1 and M be your model data array of size mx40.
O = rand(30,1) ;
M = rand(30,40) ;
RMSE = sqrt(mean((O - M).^2));
RMSE = reshape(RMSE,8,5) ;
pcolor(RMSE)
colorbar
You arrange all your models into an array and get them to the same dimensions of Observations.
  3 个评论
Fariz Syafiq Mohamad Ali
编辑:Fariz Syafiq Mohamad Ali 2022-10-2
oh sorry, i realised that there's only a total of 28 boxes/models (7x4) when it should be 8x5. an example of what im expecting;
KSSV
KSSV 2022-10-2
Just to show an example I have taken 30....it depends on your data. Hope you problem is solved?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by