File Exchange

image thumbnail

Gaussian elimination with partial pivoting

version 1.0 (1.56 KB) by

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



View License

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.

Comments and Ratings (3)

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.


Jorge (view profile)


MATLAB Release
MATLAB 7.9 (R2009b)
Tags Add Tags

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

» Watch video