08-Jan-2022 09:09:22 r8row_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test r8row() I4_LOG_10_TEST(): I4_LOG_10: whole part of log base 10, X, I4_LOG_10 0 0 1 0 2 0 3 0 9 0 10 1 11 1 99 1 101 2 -1 0 -2 0 -3 0 -9 0 I4MAT_PRINT_TEST(): I4MAT_PRINT prints an I4MAT. The I4MAT: Col: 1 2 3 4 Row 1: 11 12 13 14 2: 21 22 23 24 3: 31 32 33 34 4: 41 42 43 44 5: 51 52 53 54 6: 61 62 63 64 I4MAT_PRINT_SOME_TEST(): I4MAT_PRINT_SOME prints some of an I4MAT. The I4MAT, rows 2:4, cols 1:2: Col: 1 2 Row 2: 21 22 3: 31 32 4: 41 42 I4VEC_PRINT_TEST() I4VEC_PRINT prints an I4VEC The I4VEC: 1: 91 2: 92 3: 93 4: 94 R8ROW_COMPARE_TEST(): R8ROW_COMPARE compares rows of an R8ROW, returning -1, 0 or +1 for comparison. Matrix A: Col: 1 2 3 4 5 Row 1 : 2 0 1 2 0 2 : 0 1 2 0 1 3 : 1 2 0 1 2 4 : 2 0 1 2 0 5 : 0 1 2 0 1 6 : 1 2 0 1 2 C(I,J) = Row I compare Row J: Col: 1 2 3 4 5 6 Row 1: 0 1 1 0 1 1 2: -1 0 -1 -1 0 -1 3: -1 1 0 -1 1 0 4: 0 1 1 0 1 1 5: -1 0 -1 -1 0 -1 6: -1 1 0 -1 1 0 R8ROW_INDICATOR_TEST() R8ROW_INDICATOR returns an R8ROW indicator matrix. Indicator matrix: Col: 1 2 3 4 Row 1 : 11 12 13 14 2 : 21 22 23 24 3 : 31 32 33 34 4 : 41 42 43 44 5 : 51 52 53 54 R8ROW_MAX_TEST(): R8ROW_MAX computes maximums of an R8ROW The original matrix: Col: 1 2 3 4 Row 1 : 1 2 3 4 2 : 5 6 7 8 3 : 9 10 11 12 Row maximums: 1: 4 2: 8 3: 12 R8ROW_MEAN_TEST(): For a R8ROW (a matrix regarded as rows): R8ROW_MEAN computes means; The original matrix: Col: 1 2 3 4 Row 1 : 1 2 3 4 2 : 5 6 7 8 3 : 9 10 11 12 Row means: 1: 2.5 2: 6.5 3: 10.5 R8ROW_MIN_TEST(): R8ROW_MIN computes minimums of an R8ROW. The original matrix: Col: 1 2 3 4 Row 1 : 1 2 3 4 2 : 5 6 7 8 3 : 9 10 11 12 Row minimums: 1: 1 2: 5 3: 9 R8ROW_PART_QUICK_A_TEST R8ROW_PART_QUICK_A partitions an R8ROW matrix. The matrix: Col: 1 2 Row 1 : 2 4 2 : 8 8 3 : 6 2 4 : 0 2 5 : 10 6 6 : 10 0 7 : 0 6 8 : 5 8 L = 2 R = 4 The partitioned matrix: Col: 1 2 Row 1 : 0 6 2 : 0 2 3 : 2 4 4 : 10 6 5 : 10 0 6 : 6 2 7 : 5 8 8 : 8 8 R8ROW_PRINT_TEST R8ROW_PRINT prints an R8ROW. The R8ROW: Col: 1 2 3 4 Row 1 : 11 12 13 14 2 : 21 22 23 24 3 : 31 32 33 34 4 : 41 42 43 44 5 : 51 52 53 54 6 : 61 62 63 64 R8ROW_PRINT_SOME_TEST R8ROW_PRINT_SOME prints some of an R8ROW. The R8ROW, rows 2:4, cols 1:2: Col: 1 2 Row 2 : 21 22 3 : 31 32 4 : 41 42 r8row_running_average_test(): r8row_running_average() returns M sets of running averages of an MxN R8ROW. Random R8ROW: Col: 1 2 3 4 5 Row 1 : 7.22086 -3.53689 -2.6358 -2.8717 4.83611 2 : 8.58688 -0.822527 9.55889 1.32642 -4.46432 3 : -3.0952 3.20322 9.3575 8.73603 7.73694 4 : 8.70064 9.3626 2.28063 6.88311 9.0099 5 : 4.48539 9.47333 7.00421 9.39239 5.18103 Col: 6 7 8 9 10 Row 1 : 6.3661 5.59069 7.35187 1.58117 2.34647 2 : 6.14699 -4.52251 5.42243 0.723377 1.68379 3 : 0.883405 -0.846155 -0.243508 6.48275 4.6947 4 : 4.83217 -4.30743 9.25333 6.928 5.64047 5 : -2.4322 -3.54302 -4.48331 -2.19691 6.3203 Running averages: Col: 1 2 3 4 5 Row 1 : 0 7.22086 1.84198 0.349386 -0.455887 2 : 0 8.58688 3.88218 5.77441 4.66242 3 : 0 -3.0952 0.0540125 3.15518 4.55039 4 : 0 8.70064 9.03162 6.78129 6.80675 5 : 0 4.48539 6.97936 6.98764 7.58883 Col: 6 7 8 9 10 Row 1 : 0.602513 1.56311 2.13848 2.79015 2.65582 2 : 2.83707 3.38872 2.25855 2.65403 2.43951 3 : 5.1877 4.47032 3.71082 3.21653 3.57944 4 : 7.24738 6.84484 5.25166 5.75187 5.88255 5 : 7.10727 5.51736 4.22302 3.13473 2.54232 Col: 11 Row 1 : 2.62489 2 : 2.36394 3 : 3.69097 4 : 5.85834 5 : 2.92012 r8row_running_sum_test(): r8row_running_sum() returns the M running sums of an R8ROW. Random R8ROW: Col: 1 2 3 4 5 Row 1 : -0.859624 2.47546 6.26901 9.38937 7.61076 2 : 5.19554 9.39616 -1.17357 3.20823 -1.18577 3 : 4.82647 0.105786 2.58936 -2.92063 7.21427 4 : -2.56082 3.77902 5.48615 -2.76059 -1.34713 5 : -3.21503 -1.64282 8.36355 -1.13738 8.93895 Col: 6 7 8 9 10 Row 1 : 0.249756 0.274893 -0.712415 -3.86219 -3.05141 2 : -2.05107 7.46243 6.358 -4.19075 3.53235 3 : -1.23374 3.77896 6.30594 2.96196 2.04086 4 : 4.24067 3.24585 0.706688 6.68751 -4.82147 5 : 2.09933 8.7579 3.51732 9.01016 0.0568397 Running sums: Col: 1 2 3 4 5 Row 1 : 0 -0.859624 1.61584 7.88484 17.2742 2 : 0 5.19554 14.5917 13.4181 16.6264 3 : 0 4.82647 4.93226 7.52161 4.60098 4 : 0 -2.56082 1.21819 6.70434 3.94375 5 : 0 -3.21503 -4.85786 3.50569 2.36832 Col: 6 7 8 9 10 Row 1 : 24.885 25.1347 25.4096 24.6972 20.835 2 : 15.4406 13.3895 20.852 27.21 23.0192 3 : 11.8153 10.5815 14.3605 20.6664 23.6284 4 : 2.59663 6.8373 10.0832 10.7898 17.4773 5 : 11.3073 13.4066 22.1645 25.6818 34.692 Col: 11 Row 1 : 17.7836 2 : 26.5516 3 : 25.6692 4 : 12.6559 5 : 34.7488 R8ROW_SORT_HEAP_A_TEST(): R8ROW_SORT_HEAP_A ascending sorts an R8ROW using heap sort. Initial matrix: Col: 1 2 3 4 Row 1 : 3.29746 6.81586 5.60433 8.60654 2 : 8.35428 4.10377 2.67057 6.30674 3 : 4.48972 7.23263 3.83182 9.96908 4 : 6.22827 7.51372 9.3067 2.6254 5 : 3.32519 7.98521 3.21902 5.54143 Rows of matrix ascending sorted: Col: 1 2 3 4 Row 1 : 3.29746 6.81586 5.60433 8.60654 2 : 3.32519 7.98521 3.21902 5.54143 3 : 4.48972 7.23263 3.83182 9.96908 4 : 6.22827 7.51372 9.3067 2.6254 5 : 8.35428 4.10377 2.67057 6.30674 r8row_sort_quick_a_test(): r8row_sort_quick_a() does a quicksort of an R8ROW. The unsorted matrix: Col: 1 2 3 Row 1 : 1.06653 4.31414 8.53031 2 : 9.61898 9.10648 6.22055 3 : 0.0463422 1.81847 3.50952 4 : 7.7491 2.63803 5.1325 5 : 8.17303 1.45539 4.01808 6 : 8.68695 1.36069 0.759667 7 : 0.844358 8.69292 2.39916 8 : 3.99783 5.79705 1.23319 9 : 2.5987 5.4986 1.83908 10 : 8.00068 1.44955 2.39953 The sorted matrix: Col: 1 2 3 Row 1 : 0.0463422 1.81847 3.50952 2 : 0.844358 8.69292 2.39916 3 : 1.06653 4.31414 8.53031 4 : 2.5987 5.4986 1.83908 5 : 3.99783 5.79705 1.23319 6 : 7.7491 2.63803 5.1325 7 : 8.00068 1.44955 2.39953 8 : 8.17303 1.45539 4.01808 9 : 8.68695 1.36069 0.759667 10 : 9.61898 9.10648 6.22055 R8ROW_SUM_TEST(): R8ROW_SUM computes sums of an R8ROW; The original matrix: Col: 1 2 3 4 Row 1 : 1 2 3 4 2 : 5 6 7 8 3 : 9 10 11 12 Row sums: 1: 10 2: 26 3: 42 R8ROW_SWAP_TEST(): R8ROW_SWAP swaps two rows of an R8ROW. The original matrix: Col: 1 2 3 4 Row 1 : 1 2 3 4 2 : 5 6 7 8 3 : 9 10 11 12 Swap rows 1 and 3 The modified matrix: Col: 1 2 3 4 Row 1 : 9 10 11 12 2 : 5 6 7 8 3 : 1 2 3 4 R8ROW_TO_R8VEC_TEST(): R8ROW_TO_R8VEC converts an R8ROW to an R8VEC. The array of rows: Col: 1 2 3 4 Row 1 : 11 12 13 14 2 : 21 22 23 24 3 : 31 32 33 34 The resulting vector of rows: 1: 11 2: 12 3: 13 4: 14 5: 21 6: 22 7: 23 8: 24 9: 31 10: 32 11: 33 12: 34 R8ROW_TRANSPOSE_PRINT_TEST R8ROW_TRANSPOSE_PRINT prints a R8ROW, transposed. Matrix row order M = 5 Matrix column order N = 4 The matrix A: Col: 1 2 3 4 Row 1 : 11 12 13 14 2 : 21 22 23 24 3 : 31 32 33 34 4 : 41 42 43 44 5 : 51 52 53 54 The transposed matrix A: Row: 1 2 3 4 5 Col 1: 11 21 31 41 51 2: 12 22 32 42 52 3: 13 23 33 43 53 4: 14 24 34 44 54 R8ROW_TRANSPOSE_PRINT_SOME_TEST R8ROW_TRANSPOSE_PRINT_SOME prints some of an R8ROW, transposed. Matrix row order M = 5 Matrix column order N = 4 The matrix A: Col: 1 2 3 4 Row 1 : 11 12 13 14 2 : 21 22 23 24 3 : 31 32 33 34 4 : 41 42 43 44 5 : 51 52 53 54 The transposed matrix A, rows 1:3, cols 2:3: Row: 1 2 3 Col 2: 12 22 32 3: 13 23 33 r8row_uniform_ab_test(): r8row_uniform_ab() sets an R8ROW to random values in [A,B]. The random matrix: Col: 1 2 3 4 Row 1 : 5.33814 5.91402 8.24202 3.05579 2 : 2.39724 4.70176 5.11791 9.5364 3 : 9.22173 9.20043 3.93353 9.64908 4 : 9.5583 4.95397 5.2313 6.60167 5 : 5.92691 2.88962 2.77164 2.47824 R8ROW_VARIANCE_TEST(): R8ROW_VARIANCE computes variances of an R8ROW. The original matrix: Col: 1 2 3 4 Row 1 : 1 2 3 4 2 : 5 6 7 8 3 : 9 10 11 12 Row variances: 1: 1.66667 2: 1.66667 3: 1.66667 R8VEC_PRINT_TEST(): R8VEC_PRINT prints an R8VEC. The R8VEC: 1: 123.456 2: 5e-06 3: -1e+06 4: 3.14159 SORT_HEAP_EXTERNAL_TEST SORT_HEAP_EXTERNAL sorts objects externally. Unsorted array: 1: 5 2: 8 3: 17 4: 1 5: 1 6: 4 7: 13 8: 15 9: 13 10: 10 11: 11 12: 6 13: 15 14: 4 15: 14 16: 4 17: 8 18: 13 19: 16 20: 2 Sorted array: 1: 1 2: 1 3: 2 4: 4 5: 4 6: 4 7: 5 8: 6 9: 8 10: 8 11: 10 12: 11 13: 13 14: 13 15: 13 16: 14 17: 15 18: 15 19: 16 20: 17 r8row_test(): Normal end of execution. 08-Jan-2022 09:09:22