# AREA_UNDER_CURVE Display Area Between Y=F(X) and X Axis.

AREA_UNDER_CURVE is a MATLAB function which displays the area under a curve, that is, the points (x,y) between the X axis and the curve Y=F(X).

### Languages:

AREA_UNDER_CURVE is available in a MATLAB version.

### Related Data and Programs:

HISTOGRAM_DISPLAY, a MATLAB program which makes a bar plot of a set of data stored as columns in a file; the first column is the X values, and all the other columns are Y values to be shown as a stack of bars;

LAGRANGE_BASIS_DISPLAY, a MATLAB library which displays the basis functions associated with a given set of nodes used with the Lagrange interpolation scheme.

MOC_DISPLAY, a MATLAB program which estimates and displays the modulus of continuity function for a given function F(X) over a finite interval [A,B], using N sample values.

PWC_PLOT, a MATLAB library which converts the definition of a piecewise constant function into plottable data.

### Examples and Tests:

F1 is the function y=3/4 (1-x^2), between -1.5 and +1.5.

• f1.m, evaluates the function.
• f1.png, the plot created by the command:
          area_under_curve ( -1.5, +1.5, @f1, 'Y=3/4(1-x^2)' )


F2 is the function y=2x between 0.0 and +1.0.

• f2.m, evaluates the function.
• f2.png, the plot created by the command:
          area_under_curve ( 0.0, 1.0, @f2, 'Y=2*x' )


F3 is the function y=exp(-x) between 0.0 and +3.0.

• f3.m, evaluates the function.
• f3.png, the plot created by the command:
          area_under_curve ( 0.0, 3.0, @f3, 'Y=e^{-x}' )


F4 is the function y=exp(-0.5*(x-5)^2) between 0.0 and +7.0.

• f4.m, evaluates the function.
• f4.png, the plot created by the command:
          area_under_curve ( 0.0, 7.0, @f4, 'Y=Gaussian(x,\mu=5,\sigma=1)' )


You can go up one level to the MATLAB source codes.

Last revised on 24 February 2013.