How to insert the mean in a plot?
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Enrica Brunetti
am 25 Aug. 2020
Beantwortet: Alan Stevens
am 26 Aug. 2020
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/351395/image.png)
0 Kommentare
Akzeptierte Antwort
Alan Stevens
am 26 Aug. 2020
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!