Piecewise evaluation of mean absolute error an plotting

3 次查看(过去 30 天)
Hello everybody,
I have two vectors, A and B. A represents the reference and B a noisy reconstruction.
I want to calculate the mean absolute error, MAE, in groups in a range of 20 units.
Then, I want to plot(A, MAE) using this piecewise evaluation.
How can I do this?
Joaquim

回答(1 个)

Matt J
Matt J 2017-8-4
编辑:Matt J 2017-8-4
Something like the following, I suppose,
MAE = conv(abs(A(:)-B(:)), ones(20,1)/20 ,'valid');
plot(MAE)
  3 个评论
Matt J
Matt J 2017-8-4
They should have different lengths. The number of length=20 sections of A and B is shorter than A and B.

请先登录,再进行评论。

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by