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 07:54:29 K-Equations: 5 N-Unknowns : 3 L-Outputs : 1 Your input matrix: (Trailing commas cause read errors.) 1 2 3 4 1 1.000000 0.200000 0.300000 1.100000 2 0.300000 1.000000 0.100000 2.200000 3 0.100000 0.200000 1.000000 -0.500000 4 -1.000000 0.300000 0.200000 -0.600000 5 0.500000 -1.000000 -0.300000 -1.200000 --- Entering: kEquations <> nUnknowns --- Coefficients: The Outputs Your input: [ [B] : [Z] ] Will solve: [ [Bt*B] : [Bt*Z] ] as: [ [A] : [Y] ] yeilding: [ [Ai] : [X] ] i.e.: :The Answers ...a `least-squares best fit` of [Z]. : print: [Bp] = [Ai]*[Bt] i.e.: The pseudoinverse of [B] : print: [Bp]*[B ] =I ? and : print: [B ]*[Bp] Matrix to be solved: (note: [A] = [Bt]*[B] is symmetric) 1 2 3 1 2.350000 -0.280000 0.080000 1.710000 2 -0.280000 2.170000 0.720000 3.340000 3 0.080000 0.720000 1.230000 0.290000 --- Entering Subroutine OverWriterYA(): --- Set the noise floor: ValMin= 0.000000023500000 *** Top of the Loop: Iteration 1: *** -1 -2 -3 -1 2.350000 -0.280000 0.080000 1.710000 -2 -0.280000 2.170000 0.720000 3.340000 -3 0.080000 0.720000 1.230000 0.290000 The abs(max)= 2.3500 at n= 1 m= 1 Det.Product = 2.350000 Divide row 1 by 2.3500: 1 -2 -3 1 1.000000 -0.119149 0.034043 0.727660 -2 -0.280000 2.170000 0.720000 3.340000 -3 0.080000 0.720000 1.230000 0.290000 Subtract iPivot row 1 from the other rows using a multiplier: Reduce row 2 using multiplier -0.2800: 1 -2 -3 1 1.000000 -0.119149 0.034043 0.727660 -2 0.000000 2.136638 0.729532 3.543745 -3 0.080000 0.720000 1.230000 0.290000 Reduce row 3 using multiplier 0.0800: 1 -2 -3 1 1.000000 -0.119149 0.034043 0.727660 -2 0.000000 2.136638 0.729532 3.543745 -3 0.000000 0.729532 1.227277 0.231787 and OverWrite the inverse in column 1 [A:Y] becomes: 1 -2 -3 1 0.425532 -0.119149 0.034043 0.727660 -2 0.119149 2.136638 0.729532 3.543745 -3 -0.034043 0.729532 1.227277 0.231787 *** Top of the Loop: Iteration 2: *** 1 -2 -3 1 0.425532 -0.119149 0.034043 0.727660 -2 0.119149 2.136638 0.729532 3.543745 -3 -0.034043 0.729532 1.227277 0.231787 The abs(max)= 2.1366 at n= 2 m= 2 Det.Product = 5.021100 Divide row 2 by 2.1366: 1 2 -3 1 0.425532 -0.119149 0.034043 0.727660 2 0.055765 1.000000 0.341439 1.658561 -3 -0.034043 0.729532 1.227277 0.231787 Subtract iPivot row 2 from the other rows using a multiplier: Reduce row 1 using multiplier -0.1191: 1 2 -3 1 0.432176 0.000000 0.074725 0.925275 2 0.055765 1.000000 0.341439 1.658561 -3 -0.034043 0.729532 1.227277 0.231787 Reduce row 3 using multiplier 0.7295: 1 2 -3 1 0.432176 0.000000 0.074725 0.925275 2 0.055765 1.000000 0.341439 1.658561 -3 -0.074725 0.000000 0.978186 -0.978186 and OverWrite the inverse in column 2 [A:Y] becomes: 1 2 -3 1 0.432176 0.055765 0.074725 0.925275 2 0.055765 0.468025 0.341439 1.658561 -3 -0.074725 -0.341439 0.978186 -0.978186 *** Top of the Loop: Iteration 3: *** 1 2 -3 1 0.432176 0.055765 0.074725 0.925275 2 0.055765 0.468025 0.341439 1.658561 -3 -0.074725 -0.341439 0.978186 -0.978186 The abs(max)= 0.9782 at n= 3 m= 3 Det.Product = 4.911569 Divide row 3 by 0.9782: 1 2 3 1 0.432176 0.055765 0.074725 0.925275 2 0.055765 0.468025 0.341439 1.658561 3 -0.076391 -0.349053 1.000000 -1.000000 Subtract iPivot row 3 from the other rows using a multiplier: Reduce row 1 using multiplier 0.0747: 1 2 3 1 0.437885 0.081848 0.000000 1.000000 2 0.055765 0.468025 0.341439 1.658561 3 -0.076391 -0.349053 1.000000 -1.000000 Reduce row 2 using multiplier 0.3414: 1 2 3 1 0.437885 0.081848 0.000000 1.000000 2 0.081848 0.587205 0.000000 2.000000 3 -0.076391 -0.349053 1.000000 -1.000000 and OverWrite the inverse in column 3 [A:Y] becomes: 1 2 3 1 0.437885 0.081848 -0.076391 1.000000 2 0.081848 0.587205 -0.349053 2.000000 3 -0.076391 -0.349053 1.022301 -1.000000 *** Solver's results: *** Determinant = 4.911569 Rank = 3 1 2 3 1 0.437885 0.081848 -0.076391 1.000000 2 0.081848 0.587205 -0.349053 2.000000 3 -0.076391 -0.349053 1.022301 -1.000000 OverWriter Check: [Ai]*[A] = [I] ? 1 2 3 1 1.000000 -0.000000 0.000000 2 0.000000 1.000000 -0.000000 3 -0.000000 -0.000000 1.000000 OverWriter Check: [A]*[Ai] = [I] ? 1 2 3 1 1.000000 0.000000 -0.000000 2 -0.000000 1.000000 -0.000000 3 0.000000 -0.000000 1.000000 --- Exiting Subroutine OverWriterYA(): --- --- Entering Subroutine ErrorEval(): --- *** Answers & Error evaluation: *** Answers for column 1: Unknown 1= 1.000000000000 = 1.000000000000D+000 Unknown 2= 2.000000000000 = 2.000000000000D+000 Unknown 3= -1.000000000000 = -1.000000000000D+000 Error evaluation for column 1: Equation: Ycomputed - Yin = Yerror 1: 1.100000000 1.100000000 -0.000000000 = -2.220446049D-016 2: 2.200000000 2.200000000 -0.000000000 = -4.440892099D-016 3: -0.500000000 -0.500000000 0.000000000 = 0.000000000D+000 4: -0.600000000 -0.600000000 -0.000000000 = -1.110223025D-016 5: -1.200000000 -1.200000000 0.000000000 = 0.000000000D+000 RMS error= 0.000000000 = 2.275280135D-016 2: AbsMax error= -0.000000000 = -4.440892099D-016 --- Exiting Subroutine ErrorEval(): --- Computing the pseudoinverse: [Bp]= Unknown Eqn: 1 Eqn: 2 Eqn: 3 Eqn: 4 Eqn: 5 1 0.431337 0.205574 -0.016233 -0.428608 0.160012 2 0.094573 0.576854 -0.223428 0.024503 -0.441566 3 0.160488 -0.269741 0.944851 0.176135 0.004168 [Bp]*[B] = [I] ? 1 2 3 1 1.000000 -0.000000 -0.000000 2 0.000000 1.000000 0.000000 3 -0.000000 -0.000000 1.000000 [B]*[Bp] = not [I] 1 2 3 4 5 1 0.498398 0.240022 0.222537 -0.370867 0.072949 2 0.240022 0.611552 -0.133812 -0.086466 -0.393145 3 0.222537 -0.133812 0.898542 0.138175 -0.068144 4 -0.370867 -0.086466 0.138175 0.471186 -0.291648 5 0.072949 -0.393145 -0.068144 -0.291648 0.520321 --- Exiting: kEquations <> nUnknowns --- Done: 09-14-2011 07:54:29 - closing MUSEOUT.TXT