MATRIX commands


PROGRAM NAME

mlse - Least Squares Solution to System of Linear Equations

DESCRIPTION

mlse solves a system of linear simultaneous equations by either the QR or LQ decomposition. The input consists of a real or complex matrix A and a real or complex column vector b. If A is of size M rows by N columns, then for M>N mlse finds the least squares solution to the overdetermined system

        minimize || b - A*x ||
           x                  2

and for M<N mlse finds the minimum norm solution to the underdetermined system

        A*x = b.

It is assumed that A has full rank, i.e. rank(A) = min(M,N). If A does not have full rank, then mlse will fail. In this case you may wish to use msvd to compute the solution.

For the overdetermined case, the QR decomposition is used, with the LQ decomposition used for the underdetermined situation.

Multiple right hand sides (b vectors) can be supplied as columns of a matrix B, and a solution will be computed for each b vector. These solutions will be stored in the columns of a solution matrix X. Note that the solution for each b vector is obtained independently; this is not the same as solving the system min || B - AX ||.

If either input (A matrix or b vector) is complex then the output will be of type KDCOMPLEX. Otherwise, the output will be of type KDOUBLE.

REQUIRED ARGUMENTS

-i1
type: infile
desc: A matrix
-i2
type: infile
desc: b vector (or B matrix)
-o
type: outfile
desc: solution vector (or matrix)

OPTIONAL ARGUMENTS

none

EXAMPLES

SEE ALSO

RESTRICTIONS

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.