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.
>>

Réponses (2)

dpb
dpb le 23 Mai 2016
Modifié(e) : dpb le 23 Mai 2016
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 le 27 Nov 2017

0 votes

really? this is how matlab wastes our time?

1 commentaire

dpb
dpb le 27 Nov 2017
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?

Connectez-vous pour commenter.

Catégories

Question posée :

le 23 Mai 2016

Commenté :

dpb
le 27 Nov 2017

Community Treasure Hunt

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

Start Hunting!

Translated by