18-Aug-2022 09:55:30 R83V_TEST(): MATLAB version Test R83V(). R83V_CG_TEST R83V_CG applies CG to an R83V matrix. Number of variables N = 10 Norm of residual ||Ax-b|| = 1.60815e-15 Norm of error ||x1-x2|| = 5.41056e-16 R83V_COPY_TEST R83V_COPY copies an R83V matrix. We check three cases, MN. A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 B = copy of A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 B = copy of A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 A: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 B = copy of A: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 R83V_CR_FA_TEST R83V_CR_FA factors an R83V matrix; Once the matrix has been factored, we can call R83V_CR_SL to solve a linear system. Matrix order N = 5 Demonstrate multiple system solution method. System matrix A: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 -1 5: -1 2 Solve linear system number #1 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 Solve linear system number #2 Solution: 1: 1 2: 1 3: 1 4: 1 5: 1 R83V_CR_SL_TEST R83V_CR_SL solves a factored system after R83V_CR_FA has factored it. Matrix order N = 5 Demonstrate multiple system solution method. Input matrix A: Col: 1 2 3 4 5 Row --- 1: 4 2 2: 1 4 2 3: 1 4 2 4: 1 4 2 5: 1 4 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 R83V_CR_SLS_TEST R83V_CR_SLS solves multiple linear systems A*x1:xn=b1:bn after R83V_CR_FA has factored it. Matrix order N = 5 Demonstrate multiple system solution method. Input matrix A: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 -1 5: -1 2 Right hand sides b1:b2 Col: 1 2 Row --- 1 0 1 2 0 0 3 0 0 4 0 0 5 6 1 Solutions x1:x2 Col: 1 2 Row --- 1 1 1 2 2 1 3 3 1 4 4 1 5 5 1 R83V_DIF2_TEST R83V_DIF2 sets an R83V matrix to the second difference. We check three cases, MN. Second difference in R83V format: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 Second difference in R83V format: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 4: -1 2 -1 5: -1 2 Second difference in R83V format: Col: 1 2 3 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 4: -1 R83V_FS_TEST R83V_FS factors and solves a linear system for an R83V matrix. Matrix order N = 10 The right hand side: 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 0 10: 11 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 10: 10 R83V_GS_SL_TEST R83V_GS_SL applies Gauss-Seidel iteration with an R83V matrix to solve a linear system A*x=b. Current solution estimate: 1: 0.634606 2: 1.3265 3: 2.09566 4: 2.95451 5: 3.90741 6: 4.95088 7: 6.07442 8: 7.2619 9: 8.4933 10: 9.74665 Current solution estimate: 1: 0.953567 2: 1.9145 3: 2.88533 4: 3.86757 5: 4.86173 6: 5.86733 7: 6.88302 8: 7.90675 9: 8.93599 10: 9.968 Current solution estimate: 1: 0.994126 2: 1.98918 3: 2.98549 4: 3.98325 5: 4.98251 6: 5.98322 7: 6.9852 8: 7.9882 9: 8.9919 10: 9.99595 R83V_INDICATOR_TEST R83V_INDICATOR sets an R83V indicator matrix. We check three cases, MN. R83V indicator matrix: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 R83V indicator matrix: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 R83V indicator matrix: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 R83V_JAC_SL_TEST R83V_JAC_SL applies Jacobi iteration with an R83V matrix to solve a linear system A*x=b. Current solution: 1: 0.315171 2: 0.727797 3: 1.14042 4: 1.82758 5: 2.51474 6: 3.59047 7: 4.6662 8: 6.1282 9: 7.5902 10: 9.2951 Current solution: 1: 0.757545 2: 1.51509 3: 2.34936 4: 3.18363 5: 4.14729 6: 5.11094 7: 6.21581 8: 7.32068 9: 8.53366 10: 9.74665 Current solution: 1: 0.910021 2: 1.83432 3: 2.75863 4: 3.72124 5: 4.68386 6: 5.69666 7: 6.70946 8: 7.76839 9: 8.82731 10: 9.91366 R83V_MTV_TEST R83V_MV computes b=A'*x, where A is an R83V matrix. We check three cases, MN. Product comparison: 1: 1.26635 1.26635 2: 4.05846 4.05846 3: 1.76108 1.76108 4: 0.32987 0.32987 5: 0 0 Product comparison: 1: 0.852144 0.852144 2: 3.63516 3.63516 3: 4.21422 4.21422 4: 4.59692 4.59692 5: 1.82437 1.82437 Product comparison: 1: 0.998532 0.998532 2: 3.95714 3.95714 3: 3.73631 3.73631 R83V_MV_TEST R83V_MV computes b=A*x, where A is an R83V matrix. We check three cases, MN. Product comparison: 1: 0.961747 0.961747 2: 2.11454 2.11454 3: 3.59838 3.59838 Product comparison: 1: 1.68324 1.68324 2: 0.535837 0.535837 3: 4.48352 4.48352 4: 4.93489 4.93489 5: 2.46593 2.46593 Product comparison: 1: 1.07685 1.07685 2: 1.3789 1.3789 3: 2.11099 2.11099 4: 2.48853 2.48853 5: 0 0 R83V_PRINT_TEST R83V_PRINT prints an R83V matrix. R83V matrix: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 R83V_PRINT_SOME_TEST R83V_PRINT_SOME prints some of an R83V matrix. Rows 2-5, Cols 2-4: Col: 2 3 4 Row --- 2: 22 23 3: 32 33 34 4: 43 44 5: 54 R83V_RANDOM_TEST R83V_RANDOM randomizes an R83V matrix. We check three cases, MN. Random R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.829509 0.0661187 2: 0.218418 0.561695 0.257578 3: 0.956318 0.415307 0.109957 Random R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.415307 0.633966 2: 0.218418 0.0661187 0.0617272 3: 0.956318 0.257578 0.449539 4: 0.829509 0.109957 0.401306 5: 0.561695 0.043829 Random R83V matrix: Col: 1 2 3 Row --- 1: 0.561695 0.257578 2: 0.218418 0.415307 0.109957 3: 0.956318 0.0661187 4: 0.829509 R83V_RES_TEST R83V_RES computes b-A*x, where A is an R83V matrix. We check three cases, MN. Residual A*x-b: 1: 0 2: 0 3: 0 Residual A*x-b: 1: 0 2: 0 3: 0 4: 0 5: 0 Residual A*x-b: 1: 0 2: 0 3: 0 4: 0 5: 0 R83V_TO_R8GE_TEST R83V_TO_R8GE converts an R83V matrix to R8GE format. We check three cases, MN. R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.829509 0.0661187 2: 0.218418 0.561695 0.257578 3: 0.956318 0.415307 0.109957 R8GE matrix: Col: 1 2 3 4 5 Row --- 1 0.829509 0.0661187 0 0 0 2 0.218418 0.561695 0.257578 0 0 3 0 0.956318 0.415307 0.109957 0 R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0.415307 0.633966 2: 0.218418 0.0661187 0.0617272 3: 0.956318 0.257578 0.449539 4: 0.829509 0.109957 0.401306 5: 0.561695 0.043829 R8GE matrix: Col: 1 2 3 4 5 Row --- 1 0.415307 0.633966 0 0 0 2 0.218418 0.0661187 0.0617272 0 0 3 0 0.956318 0.257578 0.449539 0 4 0 0 0.829509 0.109957 0.401306 5 0 0 0 0.561695 0.043829 R83V matrix: Col: 1 2 3 Row --- 1: 0.561695 0.257578 2: 0.218418 0.415307 0.109957 3: 0.956318 0.0661187 4: 0.829509 R8GE matrix: Col: 1 2 3 Row --- 1 0.561695 0.257578 0 2 0.218418 0.415307 0.109957 3 0 0.956318 0.0661187 4 0 0 0.829509 5 0 0 0 R83V_TO_R8VEC_TEST R83V_TO_R8VEC copies an R83V matrix to an R8VEC. We check three cases, MN. R83V matrix A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 Vector version of A: 1: 11 2: 21 3: 12 4: 22 5: 32 6: 23 7: 33 8: 34 R83V matrix A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 Vector version of A: 1: 11 2: 21 3: 12 4: 22 5: 32 6: 23 7: 33 8: 43 9: 34 10: 44 11: 54 12: 45 13: 55 R83V matrix A: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 Vector version of A: 1: 11 2: 21 3: 12 4: 22 5: 32 6: 23 7: 33 8: 43 R83V_TRANSPOSE_TEST R83V_TRANSPOSE makes a transposed copy of an R83V matrix. We check three cases, MN. A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 B = tranposed copy of A: Col: 1 2 3 Row --- 1: 11 21 2: 12 22 32 3: 23 33 4: 34 A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 B = tranposed copy of A: Col: 1 2 3 4 5 Row --- 1: 11 21 2: 12 22 32 3: 23 33 43 4: 34 44 54 5: 45 55 A: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 B = tranposed copy of A: Col: 1 2 3 4 5 Row --- 1: 11 21 2: 12 22 32 3: 23 33 43 R83V_ZEROS_TEST R83V_ZEROS zeros an R83V matrix. We check three cases, MN. Zeroed R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0 0 2: 0 0 0 3: 0 0 0 Zeroed R83V matrix: Col: 1 2 3 4 5 Row --- 1: 0 0 2: 0 0 0 3: 0 0 0 4: 0 0 0 5: 0 0 Zeroed R83V matrix: Col: 1 2 3 Row --- 1: 0 0 2: 0 0 0 3: 0 0 4: 0 R8GE_TO_R83V_TEST R8GE_TO_R83V copies an R8GE matrix to an R83V matrix. We check three cases, MN. R8GE matrix A: Col: 1 2 3 4 5 Row --- 1 11 12 13 14 15 2 21 22 23 24 25 3 31 32 33 34 35 R83V copy of (some of ) matrix A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 R8GE matrix A: Col: 1 2 3 4 5 Row --- 1 11 12 13 14 15 2 21 22 23 24 25 3 31 32 33 34 35 4 41 42 43 44 45 5 51 52 53 54 55 R83V copy of (some of ) matrix A: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 4: 43 44 45 5: 54 55 R8GE matrix A: Col: 1 2 3 Row --- 1 11 12 13 2 21 22 23 3 31 32 33 4 41 42 43 5 51 52 53 R83V copy of (some of ) matrix A: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 R8VEC_TO_R83V_TEST R8VEC_TO_R83V copies an R8VEC to an R83V matrix. We check three cases, MN. R8VEC: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 R83V matrix: Col: 1 2 3 4 5 Row --- 1: 1 3 2: 2 4 6 3: 5 7 8 R8VEC: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 9: 9 10: 10 11: 11 12: 12 13: 13 R83V matrix: Col: 1 2 3 4 5 Row --- 1: 1 3 2: 2 4 6 3: 5 7 9 4: 8 10 12 5: 11 13 R8VEC: 1: 1 2: 2 3: 3 4: 4 5: 5 6: 6 7: 7 8: 8 R83V matrix: Col: 1 2 3 Row --- 1: 1 3 2: 2 4 6 3: 5 7 4: 8 r83v_test(): Normal end of execution. 18-Aug-2022 09:55:30