In [21]:
using NMfE
Gaussian elimination of an equation like:
$[\mathbf{A}]\{\mathbf{x}\}=\{\mathbf{b}\}$
First define matrix A and right hand side vector b:
In [22]:
A=[10. 1. -5.;-20. 3. 20.;5. 3. 5.]
Out[22]:
In [23]:
b=[1., 2., 6.]
Out[23]:
In [32]:
c = A\b
Out[32]:
In [33]:
round(A * c, 14) == b
Out[33]: