plot mean square error
显示 更早的评论
hi,
i want to plot mean square error in matlab
i use the code: MSE=mean((YP-Yd).^2);
it gives me only one value, i want to know a code that gives me a vector to plot it
thanks in advance
1 个评论
Azzi Abdelmalek
2015-8-16
Can you explain? You have two vectors YP and Yd, the mean of YP-Yd is one number, why are you expecting the result to be a vector?
采纳的回答
更多回答(1 个)
NEWAY YIFRU ADAMU
2022-5-19
0 个投票
t= length(simulation_time);
for i = 1:t
mse(i) = mean((y(i)-x(i)).^2)
end
plot(abs(mse))
%% or
for i = 1:t
mse(i) = mse(i)+ mean((y(i)-x(i)).^2)
end
plot(abs(mse))
类别
在 帮助中心 和 File Exchange 中查找有关 Uniform Distribution (Continuous) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!