How to plot an error chart with standard deviation values ​​in MATLAB?

I am very new to MATLAB and expect a step by step solution. I have data, series(y) that I have to build against (x) . I also have standard deviation values ​​for each data point (y) . Now I have to draw these series, highlighting the error bars. How can i do this?

The data is in a text file sorted by columns:

 X = -50, -49, -48, -47....0....1, 2, 3, 4, 5....till 50 Y = 1.2, 1.0, 1.1, 1.9, 1.3..... 

Standard deviation = 0.6, 0.5, 0.3, 0.6, 0.6.....

Also, how can I control the tick and appearance properties for these types of charts?

+6
source share
1 answer
 x = 1:0.1:10; y = sin(x); e = 0.1 * randn(length(x), 1); errorbar(x,y,e) set(gca, 'Xlim', [4 10]) set(gca, 'XTick', 4:2:10) 

enter image description here

See also get(gca) and get(gcf) for changing other properties.

For help on any of these functions, for example, help errorbar .

+10
source

Source: https://habr.com/ru/post/899981/


All Articles