Gauss Jordan Implementation
Gauss Jordan Implementation
By Khaled Sharif
Description:
This function will take a matrix designed to be used by the
Gauss-Jordan algorithm and solve it, returning a transposed
version of the last column in the ending matrix which
represents the solution to the unknown variables.
Input:
The function takes one matrix of n by n+1, where n equals
the number of unknown variables. Each row represents the
coefficients of the variables in each equation and the last
column contains the constants on the right hand side of
each equation.
Output:
The function will return a column vector representing
the solution to each variable in order of appearance in the
given matrix.
Sample Input:
x = [1 3 1 10; 1 -2 -1 -6; 2 1 2 10];
gauss(x)
Sample Output:
ans =
1.0000 2.0000 3.0000
Cite As
Khaled Sharif (2024). Gauss Jordan Implementation (https://www.mathworks.com/matlabcentral/fileexchange/38901-gauss-jordan-implementation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Mathematics > Numerical Integration and Differential Equations > Ordinary Differential Equations >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |