Output of: 'MUse.exe' version 0.50 2011.09.14 JMS A Matrix OverWriter & Linear Dependence Eliminator in action... The program may have errors. Input data may have been mis-interpreted. USE THIS PROGRAM'S RESULTS ONLY AT YOUR OWN RISK! This output is intended to be useful as 'TestCase Data' in writing and debugging your own Matrix OverWriter code in your computer language of choice. Opening file 'MUSEIN.TXT' for input: Run: 09-14-2011 09:39:38 K-Equations: 3 N-Unknowns : 3 L-Outputs : 1 Your input matrix: (Trailing commas cause read errors.) 1 2 3 1 1.000000 0.200000 0.300000 1.100000 2 0.300000 1.000000 0.100000 2.200000 3 1.140000 -2.780000 0.310000 -4.730000 --- Entering: kEquations = nUnknowns; solve directly: --- Coefficients: The Outputs Your input: [ [A] : [Y] ] solving: [ [A] : [Y] ] yielding: [ [Ai] : [X] ] i.e.: The inverse:The Answers ...an '~exact fit' if [A] is linearly independent. Matrix to be solved: 1 2 3 1 1.000000 0.200000 0.300000 1.100000 2 0.300000 1.000000 0.100000 2.200000 3 1.140000 -2.780000 0.310000 -4.730000 --- Entering Subroutine OverWriterYA(): --- Set the noise floor: ValMin= 0.000000027800000 *** Top of the Loop: Iteration 1: *** -1 -2 -3 -1 1.000000 0.200000 0.300000 1.100000 -2 0.300000 1.000000 0.100000 2.200000 -3 1.140000 -2.780000 0.310000 -4.730000 The abs(max)= -2.7800 at n= 3 m= 2 Det.Product = -2.780000 Divide row 3 by -2.7800: -1 2 -3 -1 1.000000 0.200000 0.300000 1.100000 -2 0.300000 1.000000 0.100000 2.200000 3 -0.410072 1.000000 -0.111511 1.701439 Swap row 3 with row 2: -1 2 -3 -1 1.000000 0.200000 0.300000 1.100000 3 -0.410072 1.000000 -0.111511 1.701439 -2 0.300000 1.000000 0.100000 2.200000 Swap column 2 with column 3: -1 -3 2 -1 1.000000 0.300000 0.200000 1.100000 3 -0.410072 -0.111511 1.000000 1.701439 -2 0.300000 0.100000 1.000000 2.200000 Subtract iPivot row 2 from the other rows using a multiplier: Reduce row 1 using multiplier 0.2000: -1 -3 2 -1 1.082014 0.322302 0.000000 0.759712 3 -0.410072 -0.111511 1.000000 1.701439 -2 0.300000 0.100000 1.000000 2.200000 Reduce row 3 using multiplier 1.0000: -1 -3 2 -1 1.082014 0.322302 0.000000 0.759712 3 -0.410072 -0.111511 1.000000 1.701439 -2 0.710072 0.211511 0.000000 0.498561 and OverWrite the inverse in column 3 [A:Y] becomes: -1 -3 2 -1 1.082014 0.322302 0.071942 0.759712 3 -0.410072 -0.111511 -0.359712 1.701439 -2 0.710072 0.211511 0.359712 0.498561 *** Top of the Loop: Iteration 2: *** -1 -3 2 -1 1.082014 0.322302 0.071942 0.759712 3 -0.410072 -0.111511 -0.359712 1.701439 -2 0.710072 0.211511 0.359712 0.498561 The abs(max)= 1.0820 at n= 1 m= 1 Det.Product = -3.008000 Divide row 1 by 1.0820: 1 -3 2 1 1.000000 0.297872 0.066489 0.702128 3 -0.410072 -0.111511 -0.359712 1.701439 -2 0.710072 0.211511 0.359712 0.498561 No row swapping needed - step skipped. No column swapping needed - step skipped. Subtract iPivot row 1 from the other rows using a multiplier: Reduce row 2 using multiplier -0.4101: 1 -3 2 1 1.000000 0.297872 0.066489 0.702128 3 0.000000 0.010638 -0.332447 1.989362 -2 0.710072 0.211511 0.359712 0.498561 Reduce row 3 using multiplier 0.7101: 1 -3 2 1 1.000000 0.297872 0.066489 0.702128 3 0.000000 0.010638 -0.332447 1.989362 -2 0.000000 0.000000 0.312500 -0.000000 and OverWrite the inverse in column 1 [A:Y] becomes: 1 -3 2 1 0.924202 0.297872 0.066489 0.702128 3 0.378989 0.010638 -0.332447 1.989362 -2 -0.656250 0.000000 0.312500 -0.000000 *** Top of the Loop: Iteration 3: *** 1 -3 2 1 0.924202 0.297872 0.066489 0.702128 3 0.378989 0.010638 -0.332447 1.989362 -2 -0.656250 0.000000 0.312500 -0.000000 The input equations are linearly dependent. Negative indices indicate dependent rows & columns. Overwriter inverse zero-ing uses the negative indices. Salvaging a linearly-independent subset of [Ai] as [Ad]: 1 -3 2 1 0.924202 0.000000 0.066489 0.702128 3 0.378989 0.000000 -0.332447 1.989362 -2 0.000000 0.000000 0.000000 0.000000 *** Solver's results: *** Determinant = -3.008000 Rank = 2 1 -3 2 1 0.924202 0.000000 0.066489 0.702128 3 0.378989 0.000000 -0.332447 1.989362 -2 0.000000 0.000000 0.000000 0.000000 OverWriter Check: [Ap]*[A] = [I] ? No. 1 -3 2 1 1.000000 0.000000 -0.000000 3 0.656250 0.000000 -0.312500 -2 0.000000 0.000000 1.000000 OverWriter Check: [A]*[Ap] = [I] ? No. 1 -3 2 1 1.000000 -0.000000 0.297872 3 -0.000000 1.000000 0.010638 -2 0.000000 0.000000 0.000000 --- Exiting Subroutine OverWriterYA(): --- --- Entering Subroutine ErrorEval(): --- *** Answers & Error evaluation: *** Answers for column 1: Unknown 1= 0.702127659574 = 7.021276595745D-001 Unknown 2= 1.989361702128 = 1.989361702128D+000 Unknown 3= 0.000000000000 = 0.000000000000D+000 Error evaluation for column 1: Equation: Ycomputed - Yin = Yerror 1: 1.100000000 1.100000000 0.000000000 = 0.000000000D+000 2: 2.200000000 2.200000000 0.000000000 = 0.000000000D+000 3: -4.730000000 -4.730000000 0.000000000 = 0.000000000D+000 RMS error= 0.000000000 = 0.000000000D+000 --- Exiting Subroutine ErrorEval(): --- [Ai]*[A] = [I] ? 1 2 3 1 1.000000 -0.000000 0.297872 2 -0.000000 1.000000 0.010638 3 0.000000 0.000000 0.000000 [A]*[Ai] = [I] ? 1 2 3 1 1.000000 0.000000 -0.000000 2 0.656250 0.000000 -0.312500 3 0.000000 0.000000 1.000000 --- Exiting: kEquations = nUnknowns --- Done: 09-14-2011 09:39:38 - closing MUSEOUT.TXT