How to insert the mean in a plot?
조회 수: 5 (최근 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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/351395/image.png)
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!