# how can I make a plot between theretival and experimental value with the standard deviation?

1 Ansicht (letzte 30 Tage)
reem123 am 10 Apr. 2017
Kommentiert: reem123 am 13 Apr. 2017
Hello If my calculated value is 0.351, and the experimental value is 0.621+-0.4, if I want to make a plot to show that my calculated value is within 1 sigma or 2 sigma of the experimental one
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Akzeptierte Antwort

Thorsten am 10 Apr. 2017
Bearbeitet: Thorsten am 10 Apr. 2017
h(1)= plot(1, 0.351, 'ko')
hold on
h(2) = errorbar(1, 0.641, -0.4, 0.4, 'Marker', 'x')
axis([0.9 1.1 0 1.2])
set(gca, 'XTick', []);
legend(h, {'Calculated', 'Experimental'})
##### 5 Kommentare3 ältere Kommentare anzeigen3 ältere Kommentare ausblenden
reem123 am 10 Apr. 2017
sorry, but no plot appear
reem123 am 13 Apr. 2017
Thank you, I understood what you did, and I get it. But I have a question please for more than one experimental data..I just add more values for your code..but the problem that I want them on the graph separated from each other(different locations) on X axis...this is my code please
h(1)= plot(1, 0.351, 'ko');
hold on;
h(2) = errorbar(1, 0.641, -0.4, 0.4, 'Marker', 'x');
h(3) = errorbar(1, 0.2, -0.1, 0.1, 'Marker', 'x');
h(4) = errorbar(1, 0.3, -0.1, 0.1, 'Marker', 'x');
h(5) = errorbar(1, 0.5, -0.2, 0.2, 'Marker', 'x');
axis([0.9 1.1 0 1.2]);
set(gca, 'XTick', []);
legend(h, {'Calculated', 'Experimental'});
axis([0.9 1.1 0 1.2]);
set(gca, 'XTick', []);
legend(h, {'Calculated', 'Experimental'});

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Errorbars finden Sie in Help Center und File Exchange

### Tags

Noch keine Tags eingegeben.

### Community Treasure Hunt

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

Start Hunting!

Translated by