08-Jan-2022 09:09:37 r8ut_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test r8ut(). R8GE_TO_R8UT_TEST R8GE_TO_R8UT converts an R8GE matrix to R8UT format. The random R8GE matrix: Col: 1 2 3 4 Row --- 1 0.814724 0.0975404 0.157613 0.141886 2 0.905792 0.278498 0.970593 0.421761 3 0.126987 0.546882 0.957167 0.915736 4 0.913376 0.957507 0.485376 0.792207 5 0.632359 0.964889 0.80028 0.959492 The R8UT matrix: Col: 1 2 3 4 Row --- 1 0.814724 0.0975404 0.157613 0.141886 2 0.278498 0.970593 0.421761 3 0.957167 0.915736 4 0.792207 5 R8UT_DET_TEST R8UT_DET computes the determinant of an R8UT matrix. The matrix A: Col: 1 2 3 4 5 Row --- 1 0.655741 0.0357117 0.933993 0.743132 0.706046 2 0.849129 0.678735 0.392227 0.0318328 3 0.75774 0.655478 0.276923 4 0.171187 0.0461714 5 0.0971318 Determinant is 0.00701548 R8UT_INDICATOR_TEST R8UT_INDICATOR sets up an indicator matrix in R8UT format Matrix rows M = 5 Matrix columns N = 4 The indicator matrix: Col: 1 2 3 4 Row --- 1 11 12 13 14 2 22 23 24 3 33 34 4 44 5 R8UT_INVERSE_TEST R8UT_INVERSE computes the inverse of an R8UT matrix. The matrix A: Col: 1 2 3 4 5 Row --- 1 0.823458 0.694829 0.950222 0.381558 0.489764 2 0.317099 0.0344461 0.765517 0.445586 3 0.438744 0.7952 0.646313 4 0.186873 0.709365 5 0.754687 The inverse matrix B: Col: 1 2 3 4 5 Row --- 1 1.21439 -2.66098 -2.42118 18.7239 -14.743 2 3.15358 -0.24759 -11.865 9.50252 3 2.27923 -9.69883 7.16444 4 5.35124 -5.02988 5 1.32505 The product A * B: Col: 1 2 3 4 5 Row --- 1 1 0 0 -1.33227e-15 -2.22045e-16 2 1 0 0 3.33067e-16 3 1 0 0 4 1 0 5 1 R8UT_MM_TEST R8UT_MM computes C = A * B for R8UT matrices. The matrix A: Col: 1 2 3 4 5 Row --- 1 1 1 1 1 1 2 1 1 1 1 3 1 1 1 4 1 1 5 1 The product C = A * A Col: 1 2 3 4 5 Row --- 1 1 2 3 4 5 2 1 2 3 4 3 1 2 3 4 1 2 5 1 R8UT_MTM_TEST R8UT_MTM computes C = A' * B for R8UT matrices. The matrix A: Col: 1 2 3 4 5 Row --- 1 1 1 1 1 1 2 1 1 1 1 3 1 1 1 4 1 1 5 1 The product C = A' * A Col: 1 2 3 4 5 Row --- 1 1 1 1 1 1 2 1 2 2 2 2 3 1 2 3 3 3 4 1 2 3 4 4 5 1 2 3 4 5 R8UT_MTV_TEST R8UT_MTV computes a matrix product b=A'*x for an R8UT matrix. The matrix A: Col: 1 2 3 4 Row --- 1 11 12 13 14 2 22 23 24 3 33 34 4 44 5 The vector X: 1: 1 2: 2 3: 3 4: 4 5: 5 The vector b=A'*x: 1: 11 2: 56 3: 158 4: 340 R8UT_MV_TEST R8UT_MV computes a product b=A*x for an R8UT matrix. The R8UT matrix A: Col: 1 2 3 4 Row --- 1 11 12 13 14 2 22 23 24 3 33 34 4 44 5 Vector x: 1: 1 2: 2 3: 3 4: 4 Vector b = A*x: 1: 130 2: 209 3: 235 4: 176 5: 0 R8UT_PRINT_TEST R8UT_PRINT prints an R8UT matrix. Matrix rows M = 6 Matrix columns N = 4 The R8UT matrix: Col: 1 2 3 4 Row --- 1 11 12 13 14 2 22 23 24 3 33 34 4 44 5 6 R8UT_PRINT_SOME_TEST R8UT_PRINT_SOME prints some of an R8UT matrix. Matrix rows M = 4 Matrix columns N = 6 Some of the matrix: Col: 4 5 6 Row --- 1 14 15 16 2 24 25 26 3 34 35 36 R8UT_RANDOM_TEST R8UT_RANDOM randomizes an R8UT matrix. Matrix order M, N = 5, 4 Matrix A: Col: 1 2 3 4 Row --- 1 0.276025 0.679703 0.162612 0.959744 2 0.655098 0.118998 0.340386 3 0.498364 0.585268 4 0.223812 5 R8UT_SL_TEST R8UT_SL solves a linear system A*x=b with R8UT matrix; Matrix order N = 5 The upper triangular matrix: Col: 1 2 3 4 5 Row --- 1 1 2 3 4 5 2 2 3 4 5 3 3 4 5 4 4 5 5 5 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 R8UT_SLT_TEST R8UT_SLT solves a linear system A'x=b with R8UT matrix; Matrix order N = 5 The upper triangular matrix: Col: 1 2 3 4 5 Row --- 1 1 2 3 4 5 2 2 3 4 5 3 3 4 5 4 4 5 5 5 Solution to transposed system: 1: 1 2: 2 3: 3 4: 4 5: 5 R8UT_TO_R8GE_TEST R8UT_TO_R8GE converts an R8UT matrix to R8GE format. The random R8UT matrix: Col: 1 2 3 4 Row --- 1 0.751267 0.255095 0.699077 0.547216 2 0.505957 0.890903 0.138624 3 0.959291 0.149294 4 0.257508 5 The R8GE matrix: Col: 1 2 3 4 Row --- 1 0.751267 0.255095 0.699077 0.547216 2 0 0.505957 0.890903 0.138624 3 0 0 0.959291 0.149294 4 0 0 0 0.257508 5 0 0 0 0 R8UT_ZEROS_TEST R8UT_ZEROS zeros out space for an R8UT matrix. Matrix order M, N = 5, 4 Matrix A: Col: 1 2 3 4 Row --- 1 0 0 0 0 2 0 0 0 3 0 0 4 0 5 r8ut_test(): Normal end of execution. 08-Jan-2022 09:09:37