want to plot MSE for a given error
1 回表示 (過去 30 日間)
古いコメントを表示
Please somebody tell me how to write code for Mean Square error
0 件のコメント
採用された回答
Wayne King
2012 年 5 月 31 日
Assume x is one vector and y is another. you can think of x as your original and y the fit.
x = randn(100,1);
y = randn(100,1);
mean(abs(x-y).^2)
If X and Y are images
X= randn(256,256);
Y = randn(256,256);
absD = abs(X-Y).^2;
sum(absD(:))/numel(X)
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!