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

2 views (last 30 days)
reem123 on 10 Apr 2017
Commented: reem123 on 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

Thorsten on 10 Apr 2017
Edited: Thorsten on 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'})
reem123 on 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'});

### Categories

Find more on Errorbars in Help Center and File Exchange

### Tags

No tags entered yet.

### Community Treasure Hunt

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

Start Hunting!