Gauss-Jordan Elimination with Partial Pivoting

Version 1.0.0.0 (482 Bytes) by Miguel D. B.
Gauss-Jordan Elimination with Partial Pivoting
11K Downloads
Updated 14 Mar 2006

No License

This file contains a function named "elimgauss03" which computes the reduced row echelon form of a matrix using gauss-jordan elimination with partial pivoting. As an attempt to minimize the number of calculations needed, the algorithm does not compute some unnecessary calculations.

For example, given the matrix
A =
16 2 3 13
5 11 10 8
9 7 6 12

The program would first divide the first row by 16. However, since this is done in order to make 1 the element A(1,1), the algorithm only computes A(1,2:end)=A(1,2:end)/A(1,1), and then makes A(1,1)=1.

Similarly, once the former operation is done, we will proceed to make more row operations until the first column of the matrix turns into [1; 0; 0]. The corresponding substractions are not computed, and the instruction A(2:end,1)=0 is used instead.

Thus, we have
» elimgauss03(A)
ans =
Columns 1 through 3
1 0 0
0 1 0
0 0 1
Column 4
1
3
-3

Cite As

Miguel D. B. (2026). Gauss-Jordan Elimination with Partial Pivoting (https://www.mathworks.com/matlabcentral/fileexchange/10318-gauss-jordan-elimination-with-partial-pivoting), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R11
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0