# curve¶

## Purpose¶

Computes a one-dimensional smoothing curve.

## Format¶

{ u, v } = curve(x, y, d, s, sigma, G)
Parameters: x (Kx1 vector) – x-abscissae (X-axis values). y (Kx1 vector) – y-ordinates (Y-axis values). d (Kx1 vector or scalar) – observation weights. s (scalar) – smoothing parameter. If $$s = 0$$, curve performs an interpolation. If d contains standard deviation estimates, a reasonable value for s is K. sigma (scalar) – tension factor. G (scalar) – grid size factor. u ((KxG)x1) – vector, x-abscissae, regularly spaced. v ((KxG)x1) – vector, y-ordinates, regularly spaced.

## Remarks¶

sigma contains the tension factor. This value indicates the curviness desired. If sigma is nearly zero (e.g. .001), the resulting curve is approximately the tensor product of cubic curves. If sigma is large, (e.g. 50.0) the resulting curve is approximately bi-linear. If sigma equals zero, tensor products of cubic curves result. A standard value for sigma is approximately 1.

G is the grid size factor. It determines the fineness of the output grid. For $$G = 1$$, the input and output vectors will be the same size. For $$G = 2$$, the output grid is twice as fine as the input grid, i.e., u and v will have twice as many rows as x and y.

spline.src