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

后端 未结 1 1499
花落未央
花落未央 2020-12-20 21:33

I am very new to MATLAB and expect a step-by-step solution. I have data, series(y), which I have to plot against (x). Also I have the standard devi

相关标签:
1条回答
  • 2020-12-20 21:42
    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 other properties to change.

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

    0 讨论(0)
提交回复
热议问题