c_qrsolve - Calculate the least squares solution.
SYNTAX
FUNCTION c_qrsolve (matrix, n_row, n_col, work, result, flag)
double *matrix;
long n_row;
long n_col;
double *work;
double *result;
long flag;
PARAMETERS
matrix (input/output, double)
The matrix input should be the QR decompositon matrix returned from
c_qrdecomp(). This matrix is used to find the least squares
approximation to solve Ax = b for x.
n_row (input, long)
The number of rows in the input matrix.
n_col (input, long)
The number of columns in the input matrix.
work (output, double)
The work vector returned from the c_qrdecomp() routine.
result (input/output, double)
The vector which begins as the b vector in Ax = b. The least squares
solution (which is approximately x) is returned.
flag (output, double)
A boolean flag. If FALSE, work on input, contains the results of the
c_qrdecomp() routine. If flag is TRUE, the entries in work
are reconstructed. Generally, the c_qrdecomp() routine will be used first
and FALSE should be passed in.
DESCRIPTION
This routine is used to perform least squares approximation to Ax = b, where
A is passed into c_qrdecomp(), and b is result as it is passed into
this routine. Result is returned as the least squares solution,
and should approximate x.
RETURN VALUE
c_qrsolve() has no return values.
SPECIAL CONSIDERATIONS:
The c_qrsolve() call is for C only.