Error bar in a scattered plot!
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
i'm trying to plot error bars in a scattered plot.
this is my plot:![B_O7a_2._plot.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/212189/B_O7a_2._plot.png)
![B_O7a_2._plot.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/212189/B_O7a_2._plot.png)
And i would like to add a fixed error bar (for example of a value of 0.5) on the Y axis to every point. How can i do that?
I've tried with
errFo=0.5
errorbar(y, errFo)
but it doesn't work and i get this error:
Error using errorbar>checkSingleInput (line 271)
YNegativeDelta must be empty or the same size as YData.
Error in errorbar (line 135)
yneg = checkSingleInput(neg, sz, 'YNegativeDelta');
Thank you
0 commentaires
Réponses (1)
Star Strider
le 5 Avr 2019
Try this instead:
errorbar(y, errFo*ones(size(y)), 'o')
Experiment to get the result you want.
0 commentaires
Voir également
Catégories
En savoir plus sur Errorbars dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!