Click or drag to resize
DigitalRuneMatrixDSolveLinearEquations Method (MatrixD, VectorD)
Solves the linear set of equations A * x = b.

Namespace: DigitalRune.Mathematics.Algebra
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
public static VectorD SolveLinearEquations(
	MatrixD matrixA,
	VectorD vectorB
)

Parameters

matrixA
Type: DigitalRune.Mathematics.AlgebraMatrixD
The matrix A. (Can be rectangular. Number of rows ≥ number of columns.)
vectorB
Type: DigitalRune.Mathematics.AlgebraVectorD
The column vector b with as many rows as A.

Return Value

Type: VectorD
The vector x.
Exceptions
ExceptionCondition
ArgumentNullExceptionvectorB is .
ArgumentException The number of rows does not match.
ArgumentException The number of rows in matrix A must be greater than or equal to the number of columns.
MathematicsException The matrix A does not have full rank.
Remarks
If A is a square matrix, the x contains the solutions. If A is not a square matrix, the least squares solutions is returned.
See Also