16-May-2023 23:22:01 r83_test(): MATLAB version Test r83(). r83_cg_test(): r83_cg() applies CG to an R83 matrix. Number of variables N = 10 Norm of residual |Ax-b| = 2.44816e-15 Norm of error |x1-x2| = 8.09122e-16 r83_cr_fa_test(): r83_cr_fa() factors a real tridiagonal matrix; Once the matrix has been factored, r83_cr_sl() solves the 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 r83_cr_sl_test(): r83_cr_sl() solves a factored system after r83_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 8 3 3: 2 12 4 4: 3 16 5 5: 4 20 Solution: 1: 1 2: 2 3: 3 4: 4 5: 5 r83_cr_sls_test(): r83_cr_sls() solves multiple linear systems A*x1:xn=b1:bn after r83_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 r83_dif2_test(): r83_dif2() sets an R83 matrix to the second difference. We check three cases, MN. Second difference in R83 format: Col: 1 2 3 4 5 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 -1 Second difference in R83 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 R83 format: Col: 1 2 3 Row --- 1: 2 -1 2: -1 2 -1 3: -1 2 4: -1 r83_gs_sl_test(): r83_gs_sl() applies Gauss-Seidel iteration with an R83 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 r83_indicator_test(): r83_indicator() sets an R83 indicator matrix. We check three cases, MN. R83 indicator matrix: Col: 1 2 3 4 5 Row --- 1: 11 12 2: 21 22 23 3: 32 33 34 R83 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 R83 indicator matrix: Col: 1 2 3 Row --- 1: 11 12 2: 21 22 23 3: 32 33 4: 43 r83_jac_sl_test(): r83_jac_sl() applies Jacobi iteration with an R83 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 r83_mtv_test(): r83_mv() computes b=A'*x, where A is an R83 matrix. We check three cases, MN. Product comparison: 1: 0.804847 0.804847 2: 3.53889 3.53889 3: 3.35462 3.35462 4: 2.64319 2.64319 5: 0 0 Product comparison: 1: 1.89683 1.89683 2: 2.53359 2.53359 3: 2.36995 2.36995 4: 2.24845 2.24845 5: 6.61135 6.61135 Product comparison: 1: 1.88634 1.88634 2: 3.68408 3.68408 3: 5.43487 5.43487 r83_mv_test(): r83_mv() computes b=A*x, where A is an R83 matrix. We check three cases, MN. Product comparison: 1: 1.99244 1.99244 2: 3.88529 3.88529 3: 3.46645 3.46645 Product comparison: 1: 1.4548 1.4548 2: 4.52966 4.52966 3: 6.76497 6.76497 4: 8.17913 8.17913 5: 2.74709 2.74709 Product comparison: 1: 0.455544 0.455544 2: 2.18221 2.18221 3: 3.38788 3.38788 4: 0.95409 0.95409 5: 0 0 r83_print_test(): r83_print() prints an R83 matrix. R83 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 r83_print_some_test(): r83_print_some() prints some of an R83 matrix. Rows 2-5, Cols 2-4: Col: 2 3 4 Row --- 2: 22 23 3: 32 33 34 4: 43 44 5: 54 r83_random_test(): r83_random() randomizes an R83 matrix. We check three cases, MN. Random R83 matrix: Col: 1 2 3 4 5 Row --- 1: 0.464344 0.758407 2: 0.879881 0.730866 0.865566 3: 0.953047 0.825335 0.411929 Random R83 matrix: Col: 1 2 3 4 5 Row --- 1: 0.669633 0.428046 2: 0.322322 0.0932242 0.872476 3: 0.926701 0.247507 0.748597 4: 0.0248137 0.472963 0.0948064 5: 0.450477 0.210157 Random R83 matrix: Col: 1 2 3 Row --- 1: 0.112668 0.285349 2: 0.463529 0.856443 0.249078 3: 0.618646 0.77248 4: 0.370336 r83_res_test(): r83_res() computes b-A*x, where A is an R83 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 r83_to_r8ge_test(): r83_to_r8ge() converts an R83 matrix to R8GE format. We check three cases, MN. R83 matrix: Col: 1 2 3 4 5 Row --- 1: 0.751559 0.572292 2: 0.353822 0.90517 0.79681 3: 0.640087 0.640734 0.970231 R8GE matrix: Col: 1 2 3 4 5 Row --- 1 0.751559 0.572292 0 0 0 2 0.353822 0.90517 0.79681 0 0 3 0 0.640087 0.640734 0.970231 0 R83 matrix: Col: 1 2 3 4 5 Row --- 1: 0.805527 0.232654 2: 0.695209 0.0655275 0.328311 3: 0.808665 0.427992 0.156626 4: 0.0664126 0.417309 0.655027 5: 0.0728841 0.889578 R8GE matrix: Col: 1 2 3 4 5 Row --- 1 0.805527 0.232654 0 0 0 2 0.695209 0.0655275 0.328311 0 0 3 0 0.808665 0.427992 0.156626 0 4 0 0 0.0664126 0.417309 0.655027 5 0 0 0 0.0728841 0.889578 R83 matrix: Col: 1 2 3 Row --- 1: 0.716865 0.769859 2: 0.936003 0.543522 0.890393 3: 0.757202 0.949233 4: 0.632539 R8GE matrix: Col: 1 2 3 Row --- 1 0.716865 0.769859 0 2 0.936003 0.543522 0.890393 3 0 0.757202 0.949233 4 0 0 0.632539 5 0 0 0 r83_zeros_test(): r83_zeros() zeros an R83 matrix. We check three cases, MN. Zeroed R83 matrix: Col: 1 2 3 4 5 Row --- 1: 0 0 2: 0 0 0 3: 0 0 0 Zeroed R83 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 R83 matrix: Col: 1 2 3 Row --- 1: 0 0 2: 0 0 0 3: 0 0 4: 0 r83_test(): Normal end of execution. 16-May-2023 23:22:01