home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-21 | 30.0 KB | 616 lines | [TEXT/CWIE] |
-
-
- Testing Singular Value Decompositions of rectangular matrices
-
- Rotated by PI/2 Matrix Diag(1,4,9)
-
-
-
- SVD-decompose matrix A and check if we can compose it back
-
-
- Matrix 3x3 'original matrix' is as follows
-
- | 1 | 2 | 3 |
- -------------------------------------------------------------------------------
- 1 | 0 -4 0
- 2 | 1 0 0
- 3 | 0 0 9
- Done
-
- Matrix 3x3 'left factor U' is as follows
-
- | 1 | 2 | 3 |
- -------------------------------------------------------------------------------
- 1 | -0 -1 -0
- 2 | 1 -0 -0
- 3 | 0 -0 -1
- Done
-
- Matrix 3x1 'Vector of Singular values' is as follows
-
- | 1 |
- -------------------------------------------------------------------------------
- 1 | 1
- 2 | 4
- 3 | 9
- Done
-
- Matrix 3x3 'right factor V' is as follows
-
- | 1 | 2 | 3 |
- -------------------------------------------------------------------------------
- 1 | 1 0 -0
- 2 | 0 1 -0
- 3 | 0 0 -1
- Done
- checking that U is orthogonal indeed, i.e., U'U=E and UU'=E
- checking that V is orthogonal indeed, i.e., V'V=E and VV'=E
- checking that U*Sig*V' is indeed A
-
-
- Comparison of two Matrices:
- Original A and composed USigV'
- Matrix 1:3x1:3 ''
- Matrix 1:3x1:3 ''
- Maximal discrepancy 0
- occured at the point (1,1)
- Matrix 1 element is 0
- Matrix 2 element is 0
- Absolute error v2[i]-v1[i] 0
- Relative error 0
-
- ||Matrix 1|| 14
- ||Matrix 2|| 14
- ||Matrix1-Matrix2|| 0
- ||Matrix1-Matrix2||/sqrt(||Matrix1|| ||Matrix2||) 0
-
-
- Done
-
- Example from the Forsythe, Malcolm, Moler's book
-
-
-
- SVD-decompose matrix A and check if we can compose it back
-
-
- Matrix 5x3 'original matrix' is as follows
-
- | 1 | 2 | 3 |
- -------------------------------------------------------------------------------
- 1 | 1 6 11
- 2 | 2 7 12
- 3 | 3 8 13
- 4 | 4 9 14
- 5 | 5 10 15
- Done
-
- Matrix 5x5 'left factor U' is as follows
-
- | 1 | 2 | 3 | 4 | 5 |
- -------------------------------------------------------------------------------
- 1 | -0.3546 -0.6887 0.6179 0.1219 -0.05776
- 2 | -0.3987 -0.3756 -0.6091 0.07566 0.5685
- 3 | -0.4428 -0.06242 -0.2338 -0.6969 -0.5095
- 4 | -0.487 0.2507 -0.1766 0.6792 -0.4555
- 5 | -0.5311 0.5638 0.4016 -0.1799 0.4542
- Done
-
- Matrix 3x1 'Vector of Singular values' is as follows
-
- | 1 |
- -------------------------------------------------------------------------------
- 1 | 35.13
- 2 | 2.465
- 3 | 1.196e-06
- Done
-
- Matrix 3x3 'right factor V' is as follows
-
- | 1 | 2 | 3 |
- -------------------------------------------------------------------------------
- 1 | -0.2017 0.8903 0.4082
- 2 | -0.5168 0.2573 -0.8165
- 3 | -0.832 -0.3757 0.4082
- Done
- checking that U is orthogonal indeed, i.e., U'U=E and UU'=E
- Two (3,3) elements of matrices with values 1 and 1
- differ the most, though the deviation 2.38419e-07 is small
- Two (2,2) elements of matrices with values 1 and 1
- differ the most, though the deviation 4.76837e-07 is small
- checking that V is orthogonal indeed, i.e., V'V=E and VV'=E
- Two (1,1) elements of matrices with values 1 and 1
- differ the most, though the deviation 3.57628e-07 is small
- Two (3,3) elements of matrices with values 1 and 1
- differ the most, though the deviation 2.38419e-07 is small
- checking that U*Sig*V' is indeed A
-
-
- Comparison of two Matrices:
- Original A and composed USigV'
- Matrix 1:5x1:3 ''
- Matrix 1:5x1:3 ''
- Maximal discrepancy 4.76837e-06
- occured at the point (2,3)
- Matrix 1 element is 12
- Matrix 2 element is 12
- Absolute error v2[i]-v1[i] 4.76837e-06
- Relative error 3.97364e-07
-
- ||Matrix 1|| 120
- ||Matrix 2|| 120
- ||Matrix1-Matrix2|| 3.27229e-05
- ||Matrix1-Matrix2||/sqrt(||Matrix1|| ||Matrix2||) 2.72691e-07
-
-
- Done
-
- Example from the Wilkinson, Reinsch's book
- Singular numbers are 0, 19.5959, 20, 0, 35.3270
-
-
-
- SVD-decompose matrix A and check if we can compose it back
-
-
- Matrix 8x5 'original matrix' is as follows
-
- | 1 | 2 | 3 | 4 | 5 |
- -------------------------------------------------------------------------------
- 1 | 22 10 2 3 7
- 2 | 14 7 10 0 8
- 3 | -1 13 -1 -11 3
- 4 | -3 -2 13 -2 4
- 5 | 9 8 1 -2 4
- 6 | 9 1 -7 5 -1
- 7 | 2 -6 6 5 1
- 8 | 4 5 0 -2 2
- Done
-
- Matrix 8x8 'left factor U' is as follows
-
- | 1 | 2 | 3 | 4 | 5 | 6 |
- -------------------------------------------------------------------------------
- 1 | -0.7071 0.04042 -0.1581 -0.1768 -0.2599 -0.556
- 2 | -0.5303 -0.03117 -0.1581 0.3536 0.235 0.3738
- 3 | -0.1768 0.3032 0.7906 0.1768 0.3747 -0.08507
- 4 | 3.62e-08 0.2239 -0.1581 0.7071 -0.4142 0.2025
- 5 | -0.3536 -0.6346 0.1581 2.628e-07 0.08927 0.2987
- 6 | -0.1768 0.4394 -0.1581 -0.5303 0.04782 0.5935
- 7 | 1.374e-08 0.2224 -0.4743 0.1768 0.6957 -0.2479
- 8 | -0.1768 0.4584 0.1581 2.357e-07 -0.2665 -0.003315
-
-
- | 7 | 8 |
- -------------------------------------------------------------------------------
- 1 | 0.0214 -0.255
- 2 | -0.571 0.2163
- 3 | 0.03519 -0.2678
- 4 | 0.2985 -0.3511
- 5 | 0.585 0.08857
- 6 | 0.1483 -0.3047
- 7 | 0.3793 0.07015
- 8 | 0.2739 0.7665
- Done
-
- Matrix 5x1 'Vector of Singular values' is as follows
-
- | 1 |
- -------------------------------------------------------------------------------
- 1 | 35.33
- 2 | 3.767e-07
- 3 | 20
- 4 | 19.6
- 5 | 6.981e-07
- Done
-
- Matrix 5x5 'right factor V' is as follows
-
- | 1 | 2 | 3 | 4 | 5 |
- -------------------------------------------------------------------------------
- 1 | -0.8006 0.4191 -0.3162 -0.2887 0
- 2 | -0.4804 -0.4405 0.6325 9.471e-07 -0.4185
- 3 | -0.1601 0.052 -0.3162 0.866 -0.3488
- 4 | -8.859e-09 -0.6761 -0.6325 -0.2887 -0.2442
- 5 | -0.3203 -0.413 -3.532e-07 0.2887 0.8022
- Done
- checking that U is orthogonal indeed, i.e., U'U=E and UU'=E
- Two (4,4) elements of matrices with values 1 and 1
- differ the most, though the deviation 2.38419e-07 is small
- Two (1,1) elements of matrices with values 1 and 1
- differ the most, though the deviation 2.38419e-07 is small
- checking that V is orthogonal indeed, i.e., V'V=E and VV'=E
- Two (4,4) elements of matrices with values 1 and 1
- differ the most, though the deviation 3.57628e-07 is small
- Two (3,3) elements of matrices with values 1 and 1
- differ the most, though the deviation 4.76837e-07 is small
- checking that U*Sig*V' is indeed A
-
-
- Comparison of two Matrices:
- Original A and composed USigV'
- Matrix 1:8x1:5 ''
- Matrix 1:8x1:5 ''
- Maximal discrepancy 0.000317216
- occured at the point (5,4)
- Matrix 1 element is -2
- Matrix 2 element is -1.99968
- Absolute error v2[i]-v1[i] 0.000317216
- Relative error 0.000158621
-
- ||Matrix 1|| 216
- ||Matrix 2|| 216
- ||Matrix1-Matrix2|| 0.00353294
- ||Matrix1-Matrix2||/sqrt(||Matrix1|| ||Matrix2||) 1.63562e-05
-
-
- Done
-
- Example from the Wilkinson, Reinsch's book
- Ordered singular numbers are Sig[21-k] = sqrt(k*(k-1))
-
-
-
- SVD-decompose matrix A and check if we can compose it back
-
-
- Matrix 21x20 'original matrix' is as follows
-
- | 1 | 2 | 3 | 4 | 5 | 6 |
- -------------------------------------------------------------------------------
- 1 | 20 0 0 0 0 0
- 2 | -1 19 0 0 0 0
- 3 | -1 -1 18 0 0 0
- 4 | -1 -1 -1 17 0 0
- 5 | -1 -1 -1 -1 16 0
- 6 | -1 -1 -1 -1 -1 15
- 7 | -1 -1 -1 -1 -1 -1
- 8 | -1 -1 -1 -1 -1 -1
- 9 | -1 -1 -1 -1 -1 -1
- 10 | -1 -1 -1 -1 -1 -1
- 11 | -1 -1 -1 -1 -1 -1
- 12 | -1 -1 -1 -1 -1 -1
- 13 | -1 -1 -1 -1 -1 -1
- 14 | -1 -1 -1 -1 -1 -1
- 15 | -1 -1 -1 -1 -1 -1
- 16 | -1 -1 -1 -1 -1 -1
- 17 | -1 -1 -1 -1 -1 -1
- 18 | -1 -1 -1 -1 -1 -1
- 19 | -1 -1 -1 -1 -1 -1
- 20 | -1 -1 -1 -1 -1 -1
- 21 | -1 -1 -1 -1 -1 -1
-
-
- | 7 | 8 | 9 | 10 | 11 | 12 |
- -------------------------------------------------------------------------------
- 1 | 0 0 0 0 0 0
- 2 | 0 0 0 0 0 0
- 3 | 0 0 0 0 0 0
- 4 | 0 0 0 0 0 0
- 5 | 0 0 0 0 0 0
- 6 | 0 0 0 0 0 0
- 7 | 14 0 0 0 0 0
- 8 | -1 13 0 0 0 0
- 9 | -1 -1 12 0 0 0
- 10 | -1 -1 -1 11 0 0
- 11 | -1 -1 -1 -1 10 0
- 12 | -1 -1 -1 -1 -1 9
- 13 | -1 -1 -1 -1 -1 -1
- 14 | -1 -1 -1 -1 -1 -1
- 15 | -1 -1 -1 -1 -1 -1
- 16 | -1 -1 -1 -1 -1 -1
- 17 | -1 -1 -1 -1 -1 -1
- 18 | -1 -1 -1 -1 -1 -1
- 19 | -1 -1 -1 -1 -1 -1
- 20 | -1 -1 -1 -1 -1 -1
- 21 | -1 -1 -1 -1 -1 -1
-
-
- | 13 | 14 | 15 | 16 | 17 | 18 |
- -------------------------------------------------------------------------------
- 1 | 0 0 0 0 0 0
- 2 | 0 0 0 0 0 0
- 3 | 0 0 0 0 0 0
- 4 | 0 0 0 0 0 0
- 5 | 0 0 0 0 0 0
- 6 | 0 0 0 0 0 0
- 7 | 0 0 0 0 0 0
- 8 | 0 0 0 0 0 0
- 9 | 0 0 0 0 0 0
- 10 | 0 0 0 0 0 0
- 11 | 0 0 0 0 0 0
- 12 | 0 0 0 0 0 0
- 13 | 8 0 0 0 0 0
- 14 | -1 7 0 0 0 0
- 15 | -1 -1 6 0 0 0
- 16 | -1 -1 -1 5 0 0
- 17 | -1 -1 -1 -1 4 0
- 18 | -1 -1 -1 -1 -1 3
- 19 | -1 -1 -1 -1 -1 -1
- 20 | -1 -1 -1 -1 -1 -1
- 21 | -1 -1 -1 -1 -1 -1
-
-
- | 19 | 20 |
- -------------------------------------------------------------------------------
- 1 | 0 0
- 2 | 0 0
- 3 | 0 0
- 4 | 0 0
- 5 | 0 0
- 6 | 0 0
- 7 | 0 0
- 8 | 0 0
- 9 | 0 0
- 10 | 0 0
- 11 | 0 0
- 12 | 0 0
- 13 | 0 0
- 14 | 0 0
- 15 | 0 0
- 16 | 0 0
- 17 | 0 0
- 18 | 0 0
- 19 | 2 0
- 20 | -1 1
- 21 | -1 -1
- Done
-
- Matrix 21x21 'left factor U' is as follows
-
- | 1 | 2 | 3 | 4 | 5 | 6 |
- -------------------------------------------------------------------------------
- 1 | -0.9759 -3.71e-08 3.457e-08 -2.125e-08 3.696e-09 -4.577e-09
- 2 | 0.0488 -0.9747 -4.26e-07 -9.356e-08 1.289e-07 1.485e-07
- 3 | 0.0488 0.0513 0.9733 -1.963e-07 -2.769e-07 -6.716e-08
- 4 | 0.0488 0.0513 -0.05407 -0.9718 4.383e-06 -5.87e-07
- 5 | 0.0488 0.0513 -0.05407 0.05717 0.9701 -4.123e-07
- 6 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 -0.9682
- 7 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 8 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 9 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 10 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 11 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 12 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 13 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 14 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 15 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 16 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 17 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 18 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 19 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 20 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
- 21 | 0.0488 0.0513 -0.05407 0.05717 -0.06063 0.06455
-
-
- | 7 | 8 | 9 | 10 | 11 | 12 |
- -------------------------------------------------------------------------------
- 1 | 2.205e-08 -1.524e-08 2.213e-08 4.369e-09 4.789e-09 -3.074e-08
- 2 | 3.658e-07 -9.071e-08 1.473e-07 -1.616e-07 -1.239e-08 -3.136e-08
- 3 | 1.7e-07 -2.258e-07 -3.62e-09 7.857e-08 -2.353e-08 -8.503e-08
- 4 | 1.514e-08 -2.308e-08 -5.589e-08 2.104e-07 5.449e-08 -4.6e-08
- 5 | 1.72e-07 2.004e-07 -1.102e-07 3.531e-08 -7.034e-08 -5.764e-08
- 6 | -8.348e-07 -2.774e-07 1.378e-07 -1.164e-07 -2.009e-07 -2.639e-07
- 7 | 0.9661 -4.422e-07 1.893e-07 9.333e-08 4.94e-08 7.79e-08
- 8 | -0.06901 -0.9636 -1.097e-06 1.028e-06 2.331e-07 1.367e-08
- 9 | -0.06901 0.07412 0.9608 4.235e-08 4.178e-08 4.608e-08
- 10 | -0.06901 0.07412 -0.08006 -0.9574 -4.451e-10 -7.229e-08
- 11 | -0.06901 0.07413 -0.08006 0.08704 7.009e-08 -1.185e-08
- 12 | -0.06901 0.07413 -0.08006 0.08704 -5.234e-08 4.453e-08
- 13 | -0.06901 0.07413 -0.08006 0.08704 -1.229e-07 -5.138e-08
- 14 | -0.06901 0.07413 -0.08006 0.08704 -1.563e-07 -7.388e-08
- 15 | -0.06901 0.07413 -0.08006 0.08704 2.603e-07 -2.198e-07
- 16 | -0.06901 0.07413 -0.08006 0.08704 -1.286e-07 8.494e-07
- 17 | -0.06901 0.07413 -0.08006 0.08704 -4.584e-07 0.8944
- 18 | -0.06901 0.07413 -0.08006 0.08704 0.866 -0.2236
- 19 | -0.06901 0.07413 -0.08006 0.08704 -0.2887 -0.2236
- 20 | -0.06901 0.07413 -0.08006 0.08704 -0.2887 -0.2236
- 21 | -0.06901 0.07413 -0.08006 0.08704 -0.2887 -0.2236
-
-
- | 13 | 14 | 15 | 16 | 17 | 18 |
- -------------------------------------------------------------------------------
- 1 | 4.834e-09 -5.117e-09 -3.424e-09 -1.14e-08 1.085e-08 1.896e-08
- 2 | 1.005e-07 7.063e-08 6.547e-09 2.318e-08 3.477e-08 -1.866e-08
- 3 | -1.242e-08 2.872e-08 -1.05e-08 -6.217e-08 -1.651e-08 5.811e-08
- 4 | -1.01e-07 -4.904e-08 -5.367e-09 1.203e-08 -3.832e-08 5.225e-08
- 5 | -7.227e-08 6.163e-08 2.908e-08 1.029e-07 2.881e-08 -4.705e-08
- 6 | 2.437e-08 2.404e-07 1.806e-07 5.632e-08 9.787e-08 4.172e-08
- 7 | 4.846e-08 4.16e-08 1.024e-08 -4.522e-08 1.37e-07 -6.724e-08
- 8 | 2.318e-07 1.915e-08 1.703e-07 4.187e-08 -3.731e-08 3.2e-08
- 9 | -1.212e-07 -1.046e-08 2.008e-08 1.07e-07 9.472e-08 9.679e-08
- 10 | -3.45e-07 6.052e-08 3.378e-08 -3.086e-08 7.88e-08 -1.434e-07
- 11 | 0.9535 5.978e-08 1.087e-07 -2.18e-07 -4.499e-07 2.712e-07
- 12 | -0.09535 -1.049e-08 1.113e-07 -1.616e-07 5.878e-07 -0.9487
- 13 | -0.09535 -8.414e-08 -1.979e-08 2.18e-08 0.9428 0.1054
- 14 | -0.09535 -1.97e-07 -1.908e-07 0.9354 -0.1179 0.1054
- 15 | -0.09535 -3.364e-07 -0.9258 -0.1336 -0.1179 0.1054
- 16 | -0.09535 -0.9129 0.1543 -0.1336 -0.1179 0.1054
- 17 | -0.09535 0.1826 0.1543 -0.1336 -0.1179 0.1054
- 18 | -0.09535 0.1826 0.1543 -0.1336 -0.1179 0.1054
- 19 | -0.09535 0.1826 0.1543 -0.1336 -0.1179 0.1054
- 20 | -0.09535 0.1826 0.1543 -0.1336 -0.1179 0.1054
- 21 | -0.09535 0.1826 0.1543 -0.1336 -0.1179 0.1054
-
-
- | 19 | 20 | 21 |
- -------------------------------------------------------------------------------
- 1 | 1.797e-08 -1.015e-08 0.2182
- 2 | 8.091e-09 -1.579e-08 0.2182
- 3 | 8.091e-09 -1.579e-08 0.2182
- 4 | -1.183e-08 -3.978e-09 0.2182
- 5 | -1.183e-08 -3.978e-09 0.2182
- 6 | -1.956e-09 -1.421e-09 0.2182
- 7 | 8.091e-09 -1.579e-08 0.2182
- 8 | -1.871e-09 -1.888e-08 0.2182
- 9 | -1.871e-09 -1.888e-08 0.2182
- 10 | 1.295e-08 -2.249e-08 0.2182
- 11 | 1.797e-08 -1.015e-08 0.2182
- 12 | 1.797e-08 -1.015e-08 0.2182
- 13 | -1.956e-09 -1.421e-09 0.2182
- 14 | 1.309e-09 -1.377e-08 0.2182
- 15 | 3.068e-09 -7.064e-09 0.2182
- 16 | 3.068e-09 -7.064e-09 0.2182
- 17 | 2.785e-08 -2.558e-08 0.2182
- 18 | -1.871e-09 -1.888e-08 0.2182
- 19 | -0.8165 -7.064e-09 0.2182
- 20 | 0.4082 -0.7071 0.2182
- 21 | 0.4082 0.7071 0.2182
- Done
-
- Matrix 20x1 'Vector of Singular values' is as follows
-
- | 1 |
- -------------------------------------------------------------------------------
- 1 | 20.49
- 2 | 19.49
- 3 | 18.49
- 4 | 17.49
- 5 | 16.49
- 6 | 15.49
- 7 | 14.49
- 8 | 13.49
- 9 | 12.49
- 10 | 11.49
- 11 | 3.464
- 12 | 4.472
- 13 | 10.49
- 14 | 5.477
- 15 | 6.481
- 16 | 7.483
- 17 | 8.485
- 18 | 9.487
- 19 | 2.449
- 20 | 1.414
- Done
-
- Matrix 20x20 'right factor V' is as follows
-
- | 1 | 2 | 3 | 4 | 5 | 6 |
- -------------------------------------------------------------------------------
- 1 | -1 0 0 0 0 0
- 2 | -0 -1 -5.817e-07 -7.803e-08 1.099e-07 2.885e-07
- 3 | -0 -5.496e-07 1 1.15e-08 -3.019e-07 -1.222e-07
- 4 | -0 1.103e-07 1.621e-08 -1 4.604e-06 -6.565e-07
- 5 | -0 1.84e-07 2.881e-07 4.468e-06 1 -1.81e-07
- 6 | -0 -2.145e-07 -1.894e-07 7.164e-07 -1.62e-07 -1
- 7 | -0 3.567e-07 5.349e-08 2.193e-07 -5.714e-07 -6.475e-07
- 8 | -0 6.9e-08 -1.494e-07 -8.144e-09 1.447e-07 3.973e-07
- 9 | -0 1.437e-07 2.367e-08 -1.971e-07 1.299e-07 4.323e-07
- 10 | -0 1.291e-07 5.721e-08 -1.891e-07 6.162e-08 2.174e-07
- 11 | -0 8.714e-08 3.196e-08 -9.906e-08 -2.361e-09 4.867e-08
- 12 | -0 3.968e-08 2.551e-08 -4.65e-08 -4.184e-08 -2.511e-08
- 13 | -0 3.433e-08 3.698e-08 -6.459e-08 -4.624e-08 -4.783e-08
- 14 | -0 2.71e-08 9.507e-08 4.545e-08 -3.8e-08 -4.067e-08
- 15 | -0 -1.515e-08 4.369e-08 -1.674e-08 -8.229e-08 2.892e-08
- 16 | -0 -5.691e-08 1.634e-09 8.014e-08 -7.747e-08 -7.917e-08
- 17 | -0 2.758e-08 5.199e-08 -6.585e-08 -9.886e-08 -1.47e-07
- 18 | -0 -2.051e-08 7.765e-08 1.291e-07 1.727e-08 -3.913e-08
- 19 | -0 0 0 0 0 0
- 20 | -0 0 0 0 0 0
-
-
- | 7 | 8 | 9 | 10 | 11 | 12 |
- -------------------------------------------------------------------------------
- 1 | 0 0 0 0 -0 0
- 2 | 3.214e-07 -7.08e-08 1.037e-07 -1.189e-07 -2.31e-08 1.533e-08
- 3 | 2.078e-07 -1.522e-07 -7.362e-09 7.377e-08 -2.312e-08 -5.101e-08
- 4 | 1.123e-07 1.008e-07 -1.379e-07 1.861e-07 -4.093e-08 -6.498e-08
- 5 | 3.374e-07 7.267e-08 -6.264e-08 2.724e-09 -5.436e-09 7.541e-09
- 6 | -6.075e-07 -3.378e-07 3.189e-07 -9.283e-08 -5.966e-08 -2.612e-08
- 7 | 1 -4.409e-07 -7.129e-10 5.06e-08 -3.927e-08 1.552e-07
- 8 | -4.823e-07 -1 -1.115e-06 1.071e-06 2.378e-07 -1.276e-08
- 9 | 8.088e-09 -1.192e-06 1 9.116e-08 -2.033e-08 1.381e-07
- 10 | 2.53e-08 -1.137e-06 1.323e-07 -1 1.662e-09 -2.731e-09
- 11 | 2.685e-08 3.582e-07 1.613e-07 -4.709e-07 -4.404e-08 6.036e-08
- 12 | -3.3e-08 1.358e-08 5.25e-08 3.828e-08 1.56e-08 -7.43e-08
- 13 | -9.171e-08 -1.4e-07 -1.209e-07 1.995e-07 -8.345e-08 -6.239e-08
- 14 | -1.732e-08 -4.921e-08 -1.28e-07 -3.162e-08 -1.658e-07 -2.247e-08
- 15 | 4.594e-08 -6.549e-08 -4.467e-08 -2.677e-07 1.799e-07 -1.616e-07
- 16 | 1.761e-08 6.723e-08 -1.042e-07 -4.106e-07 -1.975e-07 8.867e-07
- 17 | -1.326e-07 -1.844e-08 9.188e-08 -1.46e-08 -5.492e-07 1
- 18 | 7.881e-08 2.892e-07 6.171e-08 1.276e-07 1 7.466e-07
- 19 | 0 0 0 0 -0 0
- 20 | 0 0 0 0 -0 0
-
-
- | 13 | 14 | 15 | 16 | 17 | 18 |
- -------------------------------------------------------------------------------
- 1 | 0 0 -0 -0 0 0
- 2 | 9.778e-08 3.192e-08 1.489e-08 2.463e-08 2.958e-08 -3.491e-08
- 3 | -5.103e-08 3.163e-08 6.803e-08 -7.59e-08 -1.536e-08 3.75e-08
- 4 | -2.467e-07 -1.19e-07 -3.786e-08 -1.589e-08 -9.788e-08 6.379e-08
- 5 | 1.63e-08 6.172e-08 -7.454e-08 1.963e-08 -5.44e-08 1.749e-08
- 6 | 1.234e-07 -2.641e-08 -6.771e-08 -5.796e-08 -9.13e-09 -2.699e-08
- 7 | -5.995e-08 5.726e-08 6.742e-08 -1.522e-08 6.852e-08 -3.192e-08
- 8 | 2.723e-07 -1.519e-07 -2.498e-08 -2.589e-08 -3.785e-08 -3.424e-08
- 9 | -1.884e-07 -1.534e-07 -5.107e-08 1.103e-07 1.845e-07 4.28e-08
- 10 | -5.213e-07 3.332e-07 2.591e-07 6.569e-08 8.989e-08 -9.429e-08
- 11 | 1 5.257e-08 5.318e-08 -1.435e-07 -3.915e-07 2.351e-07
- 12 | 2.476e-07 -7.475e-08 1.837e-07 -2.188e-07 6.622e-07 -1
- 13 | 5.79e-07 5.375e-08 -1.525e-07 1.544e-07 1 6.557e-07
- 14 | 2.548e-07 -1.933e-07 -6.224e-08 1 -1.377e-07 -9.73e-08
- 15 | 1.421e-07 -3.11e-07 -1 7.571e-08 -8.913e-08 -7.328e-08
- 16 | 1.961e-09 -1 4.069e-07 -2.754e-07 7.475e-09 9.918e-08
- 17 | -9.992e-08 9.152e-07 -3.149e-07 1.621e-08 2.908e-08 -1.064e-07
- 18 | 8.998e-08 -3.906e-07 1.229e-07 1.479e-07 1.33e-07 -3.624e-08
- 19 | 0 0 -0 -0 0 0
- 20 | 0 0 -0 -0 0 0
-
-
- | 19 | 20 |
- -------------------------------------------------------------------------------
- 1 | -0 -0
- 2 | 0 0
- 3 | 0 0
- 4 | 0 0
- 5 | 0 0
- 6 | 0 0
- 7 | 0 0
- 8 | 0 0
- 9 | 0 0
- 10 | 0 0
- 11 | 0 0
- 12 | 0 0
- 13 | 0 0
- 14 | 0 0
- 15 | 0 0
- 16 | 0 0
- 17 | 0 0
- 18 | 0 0
- 19 | -1 -0
- 20 | -0 -1
- Done
- checking that U is orthogonal indeed, i.e., U'U=E and UU'=E
- Two (17,17) elements of matrices with values 1 and 1
- differ the most, though the deviation 5.96046e-07 is small
- Two (13,13) elements of matrices with values 1 and 1
- differ the most, though the deviation 5.96046e-07 is small
- checking that V is orthogonal indeed, i.e., V'V=E and VV'=E
- Two (13,13) elements of matrices with values 0.999999 and 1
- differ the most, though the deviation 5.96046e-07 is small
- Two (11,11) elements of matrices with values 0.999999 and 1
- differ the most, though the deviation 5.96046e-07 is small
- checking that U*Sig*V' is indeed A
-
-
- Comparison of two Matrices:
- Original A and composed USigV'
- Matrix 1:21x1:20 ''
- Matrix 1:21x1:20 ''
- Maximal discrepancy 7.62939e-06
- occured at the point (4,4)
- Matrix 1 element is 17
- Matrix 2 element is 17
- Absolute error v2[i]-v1[i] -7.62939e-06
- Relative error -4.48788e-07
-
- ||Matrix 1|| 420
- ||Matrix 2|| 420
- ||Matrix1-Matrix2|| 0.000381902
- ||Matrix1-Matrix2||/sqrt(||Matrix1|| ||Matrix2||) 9.09289e-07
-
-
- Done
-