Gauss solver for linear system of the equations

function fundam - is the solver of system of linear equations
163 Downloads
Aktualisiert 1. Apr 2015

Lizenz anzeigen

call [C,D,rank]=fundam(A_num,A_den) see Execute.m for examples.
A_num, A_den - two matrices which set the coefficients (numerators,denominators) of the linear equation system.

For example
1/2*x1-2/3*x2=5/4
3/4*x1+5/7*x2=2/1
A_num=[1 -2 5; 3 5 2]
A_den=[2 3 4;4 7 1]

there are 3 category of results:
1) System is inconsystent
2) System is consistent and has еру only one common solution
3) System is consystent and has a lot of solutions

The output of the solver are the matrices of the coeficients C,D - have the same logic (numerators and denominators) of each coefficient near Xn.

for 2) category (one common solution) C always has diagonal form

For example:
Numerators
C= [1 0 3;
0 1 2]

Denominators
D=[1 1 1;
1 1 5]

means
X1 =3
X2=2/5

for 3) category matrices C,D represents the fundamental solution for the system

for example

Numerators
C= [1 2 3]

Denominators
D=[1 1 7;]

should be accounted as fundamental solution:

1*X1+2*X2=3/7

-----
rank is rank ;)

Zitieren als

Oleksiy Kuts (2025). Gauss solver for linear system of the equations (https://de.mathworks.com/matlabcentral/fileexchange/50122-gauss-solver-for-linear-system-of-the-equations), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2013b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Systems Of Linear Equations finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.4.0.0

- added examples in description - how to read the results

1.3.0.0

description update(bug found in example)

1.2.0.0

- the result messages in English

1.1.0.0

- description wording

1.0.0.0