Linear Algebra Package

This is a little collection of scripts which implements some basic methods for solving Linear System
Function Description
GausPP GaussPP(m)

Reduces the augmented matrix m where
m = {a|b1|b2|....|bn}
using the Gauss method with Partial Pivoting and after performs a back substitution to solve all the linear systems ax=bi
GaussTP GaussTP(m)

Reduces the augmented matrix m where
m = {a|b1|b2|....|bn}
using the Gauss Method with Total Pivoting and after performs a back substitution to solve all the linear systems ax=bi


Note : After back substitution the reduced array is reordered to respect the original unknowns order, so usually the result matrix isn't upper triangular.
GaussTSP GaussTSP(m)

Reduces the augmented matrix m
m = {a|b1|b2|....|bn}
using the Gauss Method with Total Scaled Pivoting and after performs a back substitution to solve the linear systems ax=bi


Note:
After back substitution the reduced array is reordered to respect the original unknowns order, so usually the result matrix isn't upper triangular
GaussJordanPP GaussJordanPP(a,eps)

Computes the row reduced echelon form of matrix a[m,n] with n > m using the Gauss Jordan algorithm with Partial Pivoting. The optional parameter eps > 0 specifies the limit under which an element is set to 0.
GaussJordanTP GaussJordanTP(a,eps)

Computes the row reduced echelon form of matrix a[m,n] with n > m using the Gauss Jordan algorithm with Total Pivoting. The optional parameter eps > 0 specifies the limit under which an element is set to 0.
GaussJordanTSP GaussJordanTSP(a,eps)

Computes the row reduced echelon form of matrix a[m,n] with n > m using the Gauss Jordan algorithm with Total Scaled Pivoting. The optional parameter eps > 0 specifies the limit under which an element is set to 0.
SolveLinearSystem SolveLinearSystem(A, B, method)

Solves the linear system Ax=B using one of the available methods.

The methods are:
0: rref (built-in function)
1: inv (built-in function)
2: Gauss with Partial Pivoting
3: Gauss with Total Pivoting
4: Gauss with Total Scaled Pivoting
5: Gauss Jordan with Partial Pivoting
6: Gauss Jordan with Total Pivoting
7: Gauss Jordan with Total Scaled Pivoting

© 2007 Stefano Bertolucci