plotting stander deviations on means

How to plot std on means?
hold on
plot(1:xbig,stdu,'r*')
plot(stdd,'go')
plot(1:xbig,Out)
this is my codes, i have tried stem on it, but the std just connect to the floor. I do not know how to connect the upper std and down std to the mean points with line. Thanks for helping!!

 採用された回答

Adam Danz
Adam Danz 2018 年 6 月 29 日

0 投票

Without having the data it's impossible to visualize your plots. I understand that you want to plot standard deviations but that's about all (what's the floor?).
Option 1 is using errorbar() function where you plot a point (eg, the mean) and the standard deviation which shows up as an errorbar.
% Plot a vertical errorbar at (0,5) extending 3 units in each direction
errorbar(0, 5, -3)
Option 2 it sounds like you're trying to plot a line that extends from a lower to upper bound and passes through the mean. For that you can just use
% plot horizontal line from x=-3 to x=3 along y=5
plot([-3, 3], [5 5], 'k-')
or
% plot vertical line from y=-3 to y=3 along x=5
plot([5, 5], [-3 3], 'k-')

その他の回答 (1 件)

Matt J
Matt J 2018 年 6 月 29 日
編集済み: Matt J 2018 年 6 月 29 日

0 投票

Maybe the errorbar command is what you are looking for?

カテゴリ

ヘルプ センター および File ExchangeErrorbars についてさらに検索

製品

タグ

質問済み:

2018 年 6 月 29 日

回答済み:

2018 年 6 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by