Remove the lines in-between two different error bar

I want to remove the lines after every two error bars. This is because every two error bar represent a difference between one data.
>> MEAN' =
89.1200
88.9070
88.1680
88.1740
87.8500
87.6050
74.8940
74.6100
88.7490
88.7360
87.4600
88.7360
85.3530
85.9790
90.7470
91.2170
83.9470
84.4790
93.5950
94.1440
83.0830
82.9650
91.3840
91.7320
91.5840
92.0320
95.0300
95.3950
94.8960
95.3560
91.5140
91.9530
93.3570
93.8730
Standard deviation STD'=
0.6346 0.4709 1.4705 1.2295 1.2505 1.1407 0.3206 0.4055 0.5663 0.5767 0.7020 0.5767 1.2603 0.6356 0.2257 0.5393 0.5398 0.2920 1.0776 0.7926 0.8417 0.3398 1.3112 1.0532 0.1859 0.4610 0.5772 0.3456 0.3035 0.1798 1.0400 0.9772 0.1988 0.3018
This is the plot I am getting till now.
>>

回答 (2 件)

dpb
dpb 2016 年 5 月 23 日
編集済み: dpb 2016 年 5 月 23 日

0 投票

N=length(mn); % size of vectors for augmented row
errorbar(reshape([reshape(mn,2,[]);nan(1,N)],1,[]), ...
reshape([reshape(sd,2,[]);nan(1,N)],1,[]))
Insert NaN every third location; plot and friends will ignore those points and generate line between the non-NaN locations.
Marco Lehmann
Marco Lehmann 2017 年 11 月 27 日

0 投票

really? this is how matlab wastes our time?

1 件のコメント

dpb
dpb 2017 年 11 月 27 日
Well, I'd agree there are many areas in which ML HG could be more friendly/efficient, but one at least has to give it a chance with a data organization that there's at least some possibility it could infer what was wanted on its own...with only a single vector as input, what else could errorbar be expected to do?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

質問済み:

2016 年 5 月 23 日

コメント済み:

dpb
2017 年 11 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by