MATLAB: How to put errorbars

errorbars

Hi Everyone, How can i put errorbars in my figure below (Between red and green graphs)?

Best Answer

  • Use the errorbar function on the line of your choice. The easiest way to do this is to plot that line, then use hold to plot the others:
    figure(1)
    errorbar(Traffic, EngsetPb, barvector)
    hold on
    plot( ... the rest ... )
    hold off
    grid
    Hypothetical variables here.