How to insert the mean in a plot?

7 ビュー (過去 30 日間)
Enrica Brunetti
Enrica Brunetti 2020 年 8 月 25 日
回答済み: Alan Stevens 2020 年 8 月 26 日
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 Center および File ExchangeSensors and Transducers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by