The
CRVLENGTH function computes the length of a curve with a tabular representation, *
Y*
[*
i*
] = F(*
X*
[*
i*
]).

**CAUTION: **
Data that is highly oscillatory requires a sufficient number of samples for an accurate curve length computation.

This routine is written in the IDL language. Its source code can be found in the file ```
crvlength.pro
```

in the ```
lib
```

subdirectory of the IDL distribution.

Define a 21-element vector of *
X*
-values.

x = [-2.00, -1.50, -1.00, -0.50, 0.00, 0.50, 1.00, 1.50, 2.00, $

2.50, 3.00, 3.50, 4.00, 4.50, 5.00, 5.50, 6.00, 6.50, $

Define a 21-element vector of *
Y*
-values.

y = [-2.99, -2.37, -1.64, -0.84, 0.00, 0.84, 1.64, 2.37, 2.99, $

3.48, 3.86, 4.14, 4.33, 4.49, 4.65, 4.85, 5.13, 5.51, $

result = CRVLENGTH(x, y) *;
Compute the length of the curve*
.