And that should be done step by step.
Means the following:
( 1 3 -4 I 1 0 0 )
( 0 -1 2 I 0 1 0 )
( 0 0 2 I 0 0 1 )
.
.
.
.
( 1 0 0 I 1 3 -1 )
( 0 1 0 I 0 -1 1 ) --> Solved
( 0 0 1 I 0 0 0,5 )
Basically I think, it's possible to use a "stepbystep" Gau? alogrithmus to solve the left matrix. The steps of the solving of the left matrix should also be processed to a Identity matrix saved in Mat B.
If found a Gau? algoritmus program, but it's only working for a Nx(n+1) matrix.
So the first question is how to make it working for a NxN matrix.
Second would be: How can I assign to do the same steps(solving the left matrix) for the identity matrix(the right one)
I spent nearly 5 hours, but with no result.
thx for your help.
Lbl 0 Dim Mat A List Ans[1->A List Ans[2->B B<>A+1=>"MATRIX IS NOT IN AUGMENTED FORM N*(N+1)" B<>A+1=>Goto 0 {1,A}->Dim Mat B "INITIAL MATRIX"_ Mat A->Mat C_ For 1->K To A-1 For K->J To A Mat C[J,K]<>0=>Break Next A=1=>1->J Mat C[J,K]=0=>Goto 9 A=1=>Goto 8 If J<>K Then ClrText Locate 1,2,"SWAPPING ROWS" Locate 1,3,K Locate 1,4,"AND" Locate 1,5,J_ Swap C,J,K Mat C_ IfEnd For K+1->J To A -Mat C[J,K]%Mat C[K,K->H If H<>0 Then ClrText Locate 1,2,"ADDING" Locate 1,3,H Locate 1,4,"TIMES ROW" Locate 1,5,K Locate 1,6,"TO ROW" Locate 1,7,J_ *Row+ H,C,K,J Mat C_ IfEnd Next Next Lbl 8 ClrText "ELIMINATION COMPLETE"_ Mat C_ Mat C[A,A]->M M=0=>Goto 9 Mat C[A,A+1]%M->Mat B[1,A A=1=>Goto 7 For A-1->B To 1 Step -1 0->D For B+1->C To A Mat B[1,C]Mat C[B,C]+D->D Next (Mat C[B,A+1]-D)%Mat C[B,B->Mat B[1,B Next Lbl 7 "THE SOLN IS"_ Mat B_ Goto 0 Lbl 9 "NO UNIQUE SOLN" Goto 0