Here's an implementation of Gaussian Elimination with Partial Pivoting in MATLAB:
main.m1032 chars43 lines
Here's an example of how to use the function:
main.m260 chars10 lines
Note that this implementation assumes that A is invertible. If A is singular or nearly singular, you may encounter numerical stability issues.
gistlibby LogSnag