No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Gauss-Jordan Elimination with Partial Pivoting

3.8 | 9 ratings Rate this file 14 Downloads (last 30 days) File Size: 686 Bytes File ID: #10318 Version: 1.0

Gauss-Jordan Elimination with Partial Pivoting


Miguel D. B. (view profile)


10 Mar 2006 (Updated )

Gauss-Jordan Elimination with Partial Pivoting

| Watch this File

File Information

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

MATLAB release MATLAB 5.3 (R11)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (11)
11 Feb 2012 Roengrin Shaecil

20 Oct 2008 salman nasim

i like it

Comment only
20 Oct 2008 salman nasim

15 Feb 2008 Tim Davis

Mediocre. This can be done with a single for loop. In addition, the only purpose of this code is for educational uses, since the built-in MATLAB code is vastly superior. This code should thus be loaded with comments to describe what it does. The comments are very terse. In short, this file is rather useless and a distraction to people looking for either (a) real good code to use, or (b) real good code to read for instructional purposes.

06 Feb 2008 abalegn dagnachew

clear and simple code

10 Dec 2007 nasim abbas

it is good site

Comment only
22 Jul 2007 varin vongmanee

06 May 2007 bbb hhh

thank you for help me

18 Apr 2007 Daulet Aktan

23 Mar 2006 Duane Hanselman

This function duplicates what the MATLAB function rref already does. "R = rref(A) produces the reduced row echelon form of A using Gauss Jordan elimination with partial pivoting." There is no need to mimic a function that has been in MATLAB for 20 years.

17 Mar 2006 BIKASH SAHOO

This is very efficient code.

Contact us