MHB Solving Systems of Linear Equations with ljx.m

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! I need some help using the Matlab function ljx.m for solving a system of linear equations. I found a solved example for A= \bigl(\begin{smallmatrix}<br /> 1 &amp; -1 &amp;0 &amp; 1\\ <br /> 1 &amp; 0&amp; 1 &amp; 0\\ <br /> 1 &amp;1 &amp;2 &amp; -1<br /> \end{smallmatrix}\bigr) and b=\bigl(\begin{smallmatrix}<br /> 1\\ <br /> 1\\ <br /> -1<br /> \end{smallmatrix}\bigr).
At the first time they call the function by ljx(T,2,1).
Why do they take as pivot this element, and not for example ljx(T,1,1)??
Is there a specific reason, or can we take as pivot any element we want as long as it's different from 0?
:confused:
 
Last edited by a moderator:
Physics news on Phys.org
When I call the function ljx(T,1,1), then ljx(2,2) I get that the row y_{3} is dependent and can be written as y_{3}=-y_{1}+2y_{2}+1.

When I call the function ljx(T,2,1), then ljx(T,3,2) I get y_{1}=2y_{2}-y_{3}+1.
If I solve for y_{3} I get the same answer as at the first case. But the result y_{1}=2y_{2}-y_{3}+1 doesn't mean that y_{1} is dependent and y_{3} independent?
Are the results at both cases equal??
 

Similar threads

Back
Top