07-Jan-2022 18:11:37 coin_simulation_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2. coin_simulation() simulates and visualizes the repeated tossing of a coin. coin_biased_test() coin_biased() simulates the tossing of a biased coin N times. HEADS has a probability of 0.7 Coin toss results: -1=Tails, +1=Heads 1: -1 2: -1 3: 1 4: -1 5: 1 6: 1 7: 1 8: 1 9: -1 10: -1 11: 1 12: -1 13: -1 14: 1 15: -1 16: 1 17: 1 18: -1 19: -1 20: -1 21: 1 22: 1 23: -1 24: -1 25: 1 26: -1 27: -1 28: 1 29: 1 30: 1 31: -1 32: 1 33: 1 34: 1 35: 1 36: -1 37: 1 38: 1 39: -1 40: 1 41: 1 42: 1 43: -1 44: -1 45: 1 46: 1 47: 1 48: 1 49: -1 50: -1 51: 1 52: 1 53: 1 54: 1 55: 1 56: 1 57: -1 58: 1 59: 1 60: 1 61: -1 62: 1 63: 1 64: 1 65: -1 66: -1 67: 1 68: 1 69: 1 70: 1 71: -1 72: 1 73: -1 74: 1 75: -1 76: 1 77: 1 78: 1 79: 1 80: 1 81: 1 82: -1 83: 1 84: 1 85: -1 86: 1 87: -1 88: -1 89: 1 90: 1 91: 1 92: 1 93: 1 94: -1 95: -1 96: 1 97: 1 98: 1 99: 1 100: 1 coin_streak_test coin_streak() computes streaks of H's or T's in N tosses of a coin. Coin toss results: -1=Tails, +1=Heads 1: 1 2: -1 3: 1 4: -1 5: 1 6: -1 7: 1 8: -1 9: -1 10: -1 11: 1 12: 1 13: 1 14: -1 15: 1 16: -1 17: -1 18: -1 19: 1 20: 1 Streak list: 1: 0 2: 1 3: -1 4: 1 5: -1 6: 1 7: -1 8: 1 9: -1 10: -2 11: -3 12: 1 13: 2 14: 3 15: -1 16: 1 17: -1 18: -2 19: -3 20: 1 21: 2 coin_uniform_test(): coin_uniform() simulates the tossing of a fair coin N times. Coin toss results: -1=Tails, +1=Heads 1: 1 2: -1 3: 1 4: -1 5: -1 6: -1 7: 1 8: 1 9: 1 10: -1 11: 1 12: -1 13: 1 14: 1 15: 1 16: 1 17: -1 18: -1 19: -1 20: 1 21: -1 22: -1 23: 1 24: -1 25: 1 26: 1 27: 1 28: 1 29: 1 30: 1 31: 1 32: 1 33: -1 34: -1 35: 1 36: 1 37: 1 38: -1 39: 1 40: 1 41: -1 42: 1 43: 1 44: 1 45: 1 46: 1 47: -1 48: -1 49: -1 50: 1 51: 1 52: 1 53: -1 54: 1 55: 1 56: 1 57: -1 58: -1 59: -1 60: 1 61: -1 62: 1 63: -1 64: 1 65: -1 66: 1 67: 1 68: -1 69: -1 70: 1 71: -1 72: -1 73: 1 74: 1 75: 1 76: 1 77: -1 78: -1 79: -1 80: -1 81: -1 82: 1 83: -1 84: -1 85: 1 86: -1 87: -1 88: -1 89: -1 90: -1 91: 1 92: 1 93: 1 94: 1 95: -1 96: 1 97: 1 98: 1 99: 1 100: 1 Saving a copy of this plot in "coin_biased_barchart.png" Saving a copy of this plot in "coin_biased_plot.png" Saving a copy of this plot in "coin_biased_average.png" Saving a copy of this plot in "coin_biased_sign.png" Saving a copy of this plot in "coin_biased_streak.png" Saving a copy of this plot in "coin_biased_sum.png" Saving a copy of this plot in "coins_biased_sum_barchart.png" Saving a copy of this plot in "coin_uniform_barchart.png" Saving a copy of this plot in "coin_uniform_plot.png" Saving a copy of this plot in "coin_uniform_average.png" Saving a copy of this plot in "coin_uniform_sign.png" Saving a copy of this plot in "coin_uniform_streak.png" Saving a copy of this plot in "coin_uniform_sum.png" Saving a copy of this plot in "coins_uniform_plot.png" Saving a copy of this plot in "coins_uniform_average.png" Saving a copy of this plot in "coins_uniform_sum.png" Saving a copy of this plot in "coins_uniform_sum_barchart.png" 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 : -2.02003 3.18903 2.51379 8.14737 1.69422 2 : -3.65451 4.45988 -3.70888 -4.13376 6.9434 3 : 3.14547 0.896659 -1.22009 2.01384 7.20647 4 : -2.56417 3.51225 -2.40457 4.11022 -0.455217 5 : -4.92839 -3.75117 -4.50953 0.365834 -1.29719 Col: 6 7 8 9 10 Row 1 : 0.840032 9.09868 -0.618823 5.04961 -0.684272 2 : -2.53543 3.75504 -3.71563 8.87667 9.11041 3 : 6.26803 7.86968 4.68391 3.61998 7.21851 4 : -4.09157 0.704469 8.99794 8.69196 2.87801 5 : -3.62995 0.405509 3.16599 8.91317 7.29376 Running averages: Col: 1 2 3 4 5 Row 1 : 0 -2.02003 0.584497 1.22759 2.95754 2 : 0 -3.65451 0.402685 -0.967836 -1.75932 3 : 0 3.14547 2.02106 0.940679 1.20897 4 : 0 -2.56417 0.47404 -0.485498 0.663432 5 : 0 -4.92839 -4.33978 -4.39636 -3.20581 Col: 6 7 8 9 10 Row 1 : 2.70487 2.39407 3.35187 2.85553 3.09932 2 : -0.0187745 -0.438216 0.16082 -0.323736 0.698531 3 : 2.40847 3.05173 3.74001 3.858 3.83155 4 : 0.439703 -0.31551 -0.169798 0.976169 1.83348 5 : -2.82409 -2.9584 -2.47784 -1.77236 -0.58508 Col: 11 Row 1 : 2.72096 2 : 1.53972 3 : 4.17025 4 : 1.93793 5 : 0.202804 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 : 5.44934 6.39134 5.50105 6.36134 1.69071 2 : 8.11747 -2.3687 9.28104 -4.88199 -2.87233 3 : 3.51565 3.39819 3.1717 -1.0176 8.13452 4 : 5.17639 2.98262 -1.1137 3.25079 3.25174 5 : -4.56775 -0.439841 -4.68368 -2.92196 3.76825 Col: 6 7 8 9 10 Row 1 : 2.96199 -3.28581 4.17106 -2.97541 8.67671 2 : 7.89394 1.49887 0.165005 9.02547 9.35412 3 : 2.60769 -0.728425 -0.954879 0.0345324 0.389805 4 : 6.04406 8.02854 3.55196 -2.03571 -3.55864 5 : 7.8623 -3.99567 -3.01727 -3.92638 8.40304 Running sums: Col: 1 2 3 4 5 Row 1 : 0 5.44934 11.8407 17.3417 23.7031 2 : 0 8.11747 5.74877 15.0298 10.1478 3 : 0 3.51565 6.91384 10.0855 9.06794 4 : 0 5.17639 8.15901 7.04531 10.2961 5 : 0 -4.56775 -5.00759 -9.69128 -12.6132 Col: 6 7 8 9 10 Row 1 : 25.3938 28.3558 25.07 29.241 26.2656 2 : 7.27549 15.1694 16.6683 16.8333 25.8588 3 : 17.2025 19.8102 19.0817 18.1269 18.1614 4 : 13.5478 19.5919 27.6204 31.1724 29.1367 5 : -8.84498 -0.982678 -4.97835 -7.99562 -11.922 Col: 11 Row 1 : 34.9423 2 : 35.2129 3 : 18.5512 4 : 25.578 5 : -3.51896 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.06916 6.31189 8.1021 2.38889 2 : 3.26504 9.34604 7.78203 2.90236 3 : 7.13507 3.3337 8.83551 4.78518 4 : 2.30727 2.99688 3.99966 5.77559 5 : 2.5348 2.10956 6.9192 2.63626 r8vec_print_test(): r8vec_print() prints an R8VEC. The R8VEC: 1: 123.456 2: 5e-06 3: -1e+06 4: 3.14159 r8vec_running_average_test(): r8vec_running_average() returns the running averages of an R8VEC. Random R8VEC: 1: 5.23044 2: 2.87931 3: 2.738 4: 9.10585 5: -3.02409 6: 4.76172 7: 7.70781 8: 0.188553 9: -3.97778 10: -4.82779 Running averages: 1: 0 2: 5.23044 3: 4.05487 4: 3.61592 5: 4.9884 6: 3.3859 7: 3.6152 8: 4.19986 9: 3.69845 10: 2.84553 11: 2.0782 r8vec_running_sign3_test(): r8vec_running_sign3() returns the running sign3 of an R8VEC. Random R8VEC: 1: -4.89815 2: -0.612879 3: -1.73507 4: -0.47147 5: 3.93096 6: 3.45539 7: -1.73006 8: 0.858764 9: 0.0718473 10: 6.18809 Running sign3: 1: 0 2: -1 3: -1 4: -1 5: -1 6: -1 7: -0.33121 8: -1 9: -1 10: -1 11: 1 r8vec_running_sum_test(): r8vec_running_sum() returns the running sums of an R8VEC. Random R8VEC: 1: 0.534912 2: 1.34831 3: 3.57153 4: 3.8218 5: -4.56881 6: -3.63305 7: 2.51532 8: 8.77379 9: -1.28576 10: 4.79407 Running sums: 1: 0 2: 0.534912 3: 1.88322 4: 5.45475 5: 9.27655 6: 4.70774 7: 1.07469 8: 3.59001 9: 12.3638 10: 11.078 11: 15.8721 coin_simulation_test(): Normal end of execution. 07-Jan-2022 18:11:46