Hello All
Let's say, I have the following dataset:
s1 - 10, 12, 14
s2 - 20, 22, 24
s3 - 40, 44, 48
I want to plot a graph in MATLAB such that s1, s2, s3 are labels on x axis and y axis is the mean of the values entered for each of s1, s2, s3 along with symmetric error bar for standard deviation. Thanks!

 採用された回答

dpb
dpb 2016 年 8 月 4 日
編集済み: dpb 2016 年 8 月 4 日

0 投票

s=[10, 12, 14;20, 22, 24;40, 44, 48].';
errorbar(mean(s),std(s))
ylim([5 50])
set(gca,'xtick',1:3,'xticklabel',num2str([1:3].','S%d'))
produces

その他の回答 (0 件)

カテゴリ

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

タグ

質問済み:

AB
2016 年 8 月 4 日

編集済み:

dpb
2016 年 8 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by