View License

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

» Watch video

Highlights from
Gaussian elimination with partial pivoting

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

2.5 | 2 ratings Rate this file 26 Downloads (last 30 days) File Size: 1.56 KB File ID: #26774 Version: 1.0

Gaussian elimination with partial pivoting


Timothee (view profile)


This code will perform the Gaussian elimination with partial pivoting for any square matrix.

| Watch this File

File Information

This code can be used to solve a set of linear equations using Gaussian elimination with partial pivoting. Note that the Augmented matrix rows are not directly switches. Instead a buffer vector is keeping track of the switches made. The final solution is determined using backward substitution.

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
27 Oct 2014 John D'Errico

John D'Errico (view profile)

Of course, this is a homework assignment. NOBODY should actually use it for real work. PERIOD.

Instead, use backslash, solving the linear system of equations:

A*x = b


x = A\b;

Note that backslash works for square or non-square systems. It will be far more efficient than the homework assignment found in this submission here.

The help is poor in this code, essentially, non-existent. The only thing I like about the code is the fact that it has internal comments that explain (briefly) what each block of code does.

27 Oct 2014 Jorge

Jorge (view profile)

20 Aug 2011 priyam saraswat


Comment only

Contact us