www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/PlotVerticalAndHorizontalErrorBarsExample.m

    %% Plot Vertical and Horizontal Error Bars
% Create a line plot with both vertical and horizontal error bars at each
% data point. 

x = 1:10:100;
y = [20 30 45 40 60 65 80 75 95 90];
err = [4 3 5 3 5 3 6 4 3 3];
errorbar(x,y,err,'both')