errorbar

Purpose

Errorbar plot.

Synopsis

errorbar(x,y,e)

Description

errorbar(x,y,e) plots the graph of vector x versus vector y with errorbars specified by vector e. Vectors x, y, and e must be the same length. The error bars are each drawn a distance of e(i) above and below the points in (x,y) so that each bar is 2*e(i) long.

If x, y, and e are matrices of the same size, one errorbar graph per column is drawn.

Examples

This example shows how error bars can be added to an existing plot.

x = 0: 0.1: 2;
y = erf(x);
e = rand(size(x))/10;
errorbar(x,y,e)
          

See Also

bar, plot, std

(c) Copyright 1994 by The MathWorks, Inc.