No BSD License  

Highlights from
Gauss-Jordan Elimination with Partial Pivoting

3.77778

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

Gauss-Jordan Elimination with Partial Pivoting

by Miguel D. B.

 

10 Mar 2006 (Updated 14 Mar 2006)

Gauss-Jordan Elimination with Partial Pivoting

| Watch this File

File Information
Description

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

MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (11)
17 Mar 2006 BIKASH SAHOO

This is very efficient code.

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.

18 Apr 2007 Daulet Aktan  
06 May 2007 bbb hhh

thank you for help me

22 Jul 2007 varin vongmanee  
10 Dec 2007 nasim abbas

it is good site

06 Feb 2008 abalegn dagnachew

clear and simple code

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.

20 Oct 2008 salman nasim  
20 Oct 2008 salman nasim

i like it

11 Feb 2012 Roengrin Shaecil  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
linear algebra Miguel D. B. 22 Oct 2008 08:18:11
matrix Miguel D. B. 22 Oct 2008 08:18:11
gauss Miguel D. B. 22 Oct 2008 08:18:11
pivoting Miguel D. B. 22 Oct 2008 08:18:11
jordan Miguel D. B. 22 Oct 2008 08:18:11
jordan rouk rouk 28 Dec 2008 12:43:21
gauss intan isabella 21 Mar 2010 11:07:17
matrix intan isabella 21 Mar 2010 11:07:22
linear algebra Shahram Bekhrad 08 Jul 2010 01:57:22
gauss Alex 29 Sep 2010 23:16:52
gauss Balint Cristian 04 Mar 2011 13:45:38
gauss Kasao Kkasi 04 Jul 2011 10:58:34
gauss Medve Csaba 05 Apr 2012 12:10:33

Contact us at files@mathworks.com