How to insert the mean in a plot?

14 次查看(过去 30 天)
In this plot I want to insert the mean, the variance and standard deviation of this signal. Is there a particular function or a toolbox that executes it?

采纳的回答

Alan Stevens
Alan Stevens 2020-8-26
If you signal data is in vector y, say, then
ymean = mean(y);
ystddev = std(y);
yhi = ymean+ystdev;
ylo = ymean-ystdev;
xrange = [0 60]; % or whatever you want
plot(xrange, [ymean ymean],xrange,[ylo ylo], xrange, [yhi yhi])

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by