Linear Algebra and the C Language/a085
Gauss-Jordan Partial Pivoting (PP)
Gaussian elimination, is an algorithm for solving systems of linear equations... Wikipedia: Gaussian elimination
In this algorithm, Gauss-Jordan Partial Pivoting, the pivot chosen is the largest absolute value found in a column. For this we perform column exchanges.
The function: gj_PP_mR();
This system works with partial pivoting and total pivoting:
This system does not works with total pivoting: (Second pivot shifted to the right)
Code study
The function: gj_PP_mR(double **Ab, above);
The function: gj3_T_mR(double **Ab, above);
- c00b.c
- The function selects the best pivot and puts zero under the pivot.
- c0c.c
- The function puts zero above the pivot.
- c00d.c
Application
Singular matrix, but compatible system:
- Two equal rows with the same values of b.
- Random values
- Choose your values
Singular matrix, but incompatible system:
- Two equal rows with different values of b.
- Random values
- Choose your values