Question: Gaussian elimination Linear Algebra

Simple test of GaussianElimination function

Why doesn't this work? 

Also can I just confirm that for GaussianElimination (according to the help this uses LUDecomposition function with the output=['U'] option) the input is the augmented matrix of the system, the coefficient matrix augmented with the RHS)

In a separate test I got an example working using this code, but I've never seen this syntax before for A Matrix (using << it seems?)

 

Thank you for your help.

 

 

ORIGINAL ATTEMPT

with(LinearAlgebra):

A := matrix(3, 3, [-3, 2, 1, 1, -2, 1, 1, 2, -3]);

Matrix(3, 3, {(1, 1) = -3, (1, 2) = 2, (1, 3) = 1, (2, 1) = 1, (2, 2) = -2, (2, 3) = 1, (3, 1) = 1, (3, 2) = 2, (3, 3) = -3})

(1)

GaussianElimination(A)

Error, (in LinearAlgebra:-GaussianElimination) invalid input: LinearAlgebra:-GaussianElimination expects its 1st argument, A, to be of type Matrix() but received A

 

``

 

Download gauss_elimination_2.mw

Please Wait...