|
NAG[f04arc] NAG[nag_real_lin_eqn] - Approximate solution of real simultaneous linear equations, one right-hand side
|
|
Calling Sequence
f04arc(a, b, x, 'n'=n, 'tda'=tda, 'fail'=fail)
nag_real_lin_eqn(. . .)
Parameters
|
a - Matrix(1..n, 1..tda, datatype=float[8], order=C_order);
|
|
|
|
b - Vector(1..n, datatype=float[8]);
|
|
|
On entry: the right-hand side vector .
|
|
|
x - Vector(1..n, datatype=float[8]);
|
|
|
On exit: the solution vector .
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the first dimension of the arrays a, b, x and the second dimension of the arrays a, b, xthe array a.
|
|
On entry: , the order of the matrix A.
|
|
Constraint: . .
|
|
|
'tda'=tda - integer; (optional)
|
|
|
On entry: the second dimension of the array a as declared in the function from which nag_real_lin_eqn (f04arc) is called.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_real_lin_eqn (f04arc) calculates the approximate solution of a set of real linear equations with a single right-hand side, using an factorization with partial pivoting.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_INT_ARG_LT"
On entry, n must not be less than 1: .
"NE_SINGULAR"
The matrix is singular, possibly due to rounding errors.
|
|
Accuracy
|
|
The accuracy of the computed solution depends on the conditioning of the original matrix. For a detailed error analysis see page 107 of Wilkinson and Reinsch (1971).
|
|
Further Comments
|
|
The time taken by nag_real_lin_eqn (f04arc) is approximately proportional to .
|
|
|
Examples
|
|
>
|
n := 3:
tda := 3:
a := Matrix([[33, 16, 72], [-24, -10, -57], [-8, -4, -17]], datatype=float[8], order='C_order'):
b := Vector([-359, 281, 85], datatype=float[8]):
x := Vector(3, datatype=float[8]):
NAG:-f04arc(a, b, x, 'n' = n, 'tda' = tda):
|
|
|