Previous Page | Next Page

Language Reference

SOLVE Function

SOLVE( A, B ) ;

The SOLVE function solves a system of linear equations.

The arguments to the SOLVE function are as follows:

A

is an nonsingular matrix.

B

is an matrix.

The SOLVE function solves the set of linear equations for . The matrix must be square and nonsingular.

The expression X = SOLVE(A,B) is mathematically equivalent to using the INV function in the expression X = INV(A)*B. However, the SOLVE function is recommended over the INV function because it is more efficient and more accurate. An example follows:

   x = solve(a,b);

The solution method used is discussed in Forsythe, Malcom, and Moler (1967).

The SOLVE function uses a criterion to determine whether the input matrix is singular. See the INV function for details.

If is an matrix, the SOLVE function temporarily allocates an array in addition to the memory allocated for the return matrix.

Previous Page | Next Page | Top of Page