Plot Measuring Results with ERRORBAR

Hello,
I would like to display the mean values from various measurements and of course the deviations using "errorbar".
Assuming the following series of measurements are given:
Test_01=[1 2 3 4 5 6]
Test_02=[1.5 2.5 3.5 4.5 5.5 6.5]
Test_03=[0.5 1.5 2.5 3.5 4.5 5.5]
x=[1 2 3 4 5 6]
Can a plot with errorbar be generated directly from this or does the mean value and deviations have to be calculated manually?

回答 (2 件)

Star Strider
Star Strider 2020 年 12 月 10 日

0 投票

I would do something like this:
Test_01=[1 2 3 4 5 6];
Test_02=[1.5 2.5 3.5 4.5 5.5 6.5];
Test_03=[0.5 1.5 2.5 3.5 4.5 5.5];
x=[1 2 3 4 5 6];
Test_All = cat(1, Test_01, Test_02, Test_03);
TestMean = mean(Test_All);
TestStdv = std(Test_All);
figure
errorbar(x, TestMean, TestStdv)
grid
xlim(xlim+[-1 1])
The xlim call simply moves the first and last points away from the axis edges, and is optional.
Ive J
Ive J 2020 年 12 月 10 日

0 投票

You should calculate meaningful error estimates yourself (SD, SEM, etc), and plot it with errorbar.
doc errorbar

カテゴリ

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

タグ

質問済み:

2020 年 12 月 10 日

回答済み:

2020 年 12 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by