Produces a curve of integrals from an input curve. To compute the integral at each point, the INTEGRATE function fits a cubic spline to the 2xN matrix representation of curve C, and returns the integrals of the approximating polynomials at each point. The curve of integrals that INTEGRATE returns has the same X values as curve C.
Format
INTEGRATE (C)
Argument
Example
The following xy_plot command creates a curve, int1, whose x values are the same as the x values of curve1 on plot1. The matrix that INTEGRATE receives, is 2xN:
■The first row is the x values of curve1.
■The second row is the y values of curve1.
INTEGRATE returns two rows:
■The first is the same as the x values of curve1.
■The second is the integrals of curve1.
xy_plots curve create curve=diff1 &
x_values=(.curve1.x_data.values) &
y_values (INTEGRATE &
({.curve1.x_data.values,.curve1.y_data.values})[2,*])