1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
.help gsfit Aug85 "Gsurfit Package"
.ih
NAME
gsfit -- fit a surface to a set of data values
.ih
SYNOPSIS
include <math/gsurfit.h>
gsfit (sf, x, y, z, weight, npts, wtflag, ier)
.nf
pointer sf # surface descriptor
real x[npts] # x array, xmin <= x[i] <= xmax
real y[npts] # y array, ymin <= y[i] <= ymax
real z[npts] # data values
real weight[npts] # weight array
int npts # number of data points
int wtflag # type of weighting
int ier # error coded
.fi
.ih
ARGUMENTS
.ls sf
Pointer to the surface descriptor structure.
.le
.ls x, y
X and y value arrays.
.le
.ls z
Array of data values.
.le
.ls weight
Array of weights.
.le
.ls npts
Number of data points
.le
.ls wtflag
Type of weighting. The options are WTS_USER and WTS_UNIFORM. If wtflag =
WTS_USER individual weights for each data point are supplied by the calling
program and points with zero-valued weights are not included in the fit.
If wtflag = WTS_UNIFORM, all weights are assigned values of 1.
.le
.ls ier
Error code for the fit. The options are OK, SINGULAR and NO_DEG_FREEDOM.
If ier = SINGULAR, the numerical routines will compute a solution but one
or more of the coefficients will be zero. If ier = NO_DEG_FREEDOM there
were too few data points to solve the matrix equations and the routine
returns without fitting the data.
.le
.ih
DESCRIPTION
GSFIT zeroes the matrix and vectors, calculates the non-zero basis functions,
computes the contribution of each data point to the normal equations
and accumulates it into the appropriate array and vector elements. The
Cholesky factorization of the coefficient array is computed and the coefficients
of the fitting function are calculated.
.ih
NOTES
Checking for out of bounds x and y values is the responsibility of the user.
.ih
SEE ALSO
gsrefit, gsaccum, gsacpts, gssolve, gszero
.endhelp
|