14-Oct-2022 14:37:53 nearest_interp_1d_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test nearest_interp_1d(). The R8LIB library is needed. The test needs TEST_INTERP. nearest_interp_1d_test01(): Sample the nearest neighbor interpolant for problem #1 X, Y for problem 1 1: 0 4 2: 1.8 6 3: 3.6 6 4: 5.4 5 5: 7.2 1 6: 9 1 7: 10.8 4 8: 12.6 3 9: 14.4 3 10: 16.2 4 11: 18 0 nearest_interp_1d_test01(): Sample the nearest neighbor interpolant for problem #2 X, Y for problem 2 1: 0 0 2: 3.1 5 3: 6.2 8.66 4: 9.3 10 5: 12.4 30.6 6: 15.5 30.6 7: 18.6 30.6 8: 21.7 10 9: 24.8 8.66 10: 27.9 5 11: 31 0 nearest_interp_1d_test01(): Sample the nearest neighbor interpolant for problem #3 X, Y for problem 3 1: 0 0 2: 1.5 10 3: 3 10 4: 4.5 10 5: 6 10 6: 7.5 10 7: 9 10.5 8: 10.5 15 9: 12 50 10: 13.5 60 11: 15 85 nearest_interp_1d_test01(): Sample the nearest neighbor interpolant for problem #4 X, Y for problem 4 1: 0 0 2: 0.1 1 3: 0.2 1 4: 0.3 1 5: 0.4 1 6: 0.5 1 7: 0.6 0.3 8: 0.7 0.3 9: 0.8 0.3 10: 0.9 0.1 11: 1 1 nearest_interp_1d_test01(): Sample the nearest neighbor interpolant for problem #5 X, Y for problem 5 1: 0 0 2: 0.1 0.9 3: 0.2 0.95 4: 0.3 0.9 5: 0.4 0.1 6: 0.5 0.05 7: 0.6 0.05 8: 0.7 0.05 9: 0.8 0.2 10: 0.9 0.2 11: 1 1 nearest_interp_1d_test01(): Sample the nearest neighbor interpolant for problem #6 X, Y for problem 6 1: 595 0.644 2: 643 0.639 3: 691 0.644 4: 739 0.676 5: 787 0.683 6: 835 0.763 7: 883 1.881 8: 931 0.916 9: 979 0.615 10: 1027 0.601 11: 1075 0.608 nearest_interp_1d_test01(): Sample the nearest neighbor interpolant for problem #7 X, Y for problem 7 1: 0 1 2: 0.5 1 3: 1 2 4: 1.5 2 5: 2 2 6: 2.5 2 7: 3 2 8: 3.5 2 9: 4 2 10: 4.5 2 11: 5 1 nearest_interp_1d_test01(): Sample the nearest neighbor interpolant for problem #8 X, Y for problem 8 1: -1 1 2: -0.8 0.64 3: -0.6 0.36 4: -0.4 0.16 5: -0.2 0.04 6: 0 0 7: 0.2 0.04 8: 0.4 0.16 9: 0.6 0.36 10: 0.8 0.64 11: 1 1 nearest_interp_1d_test02(): Interpolate data from test_interp() problem #1. Number of data points = 18 Data array: Row: 1 2 Col 1: 0 4 2: 1 5 3: 2 6 4: 4 6 5: 5 5 6: 6 3 7: 7 1 8: 8 1 9: 9 1 10: 10 3 11: 11 4 12: 12 4 13: 13 3 14: 14 3 15: 15 4 16: 16 4 17: 17 3 18: 18 0 L2 interpolation error averaged per interpolant node = 0 Graphics saved as "p01_data.png". Graphics saved as "p01_nearest.png". nearest_interp_1d_test02(): Interpolate data from test_interp() problem #2. Number of data points = 18 Data array: Row: 1 2 Col 1: 0 0 2: 1.34 5 3: 5 8.66 4: 10 10 5: 10.6 10.4 6: 10.7 12 7: 10.705 28.6 8: 10.8 30.2 9: 11.4 30.6 10: 19.6 30.6 11: 20.2 30.2 12: 20.295 28.6 13: 20.3 12 14: 20.4 10.4 15: 21 10 16: 26 8.66 17: 29.66 5 18: 31 0 L2 interpolation error averaged per interpolant node = 0 Graphics saved as "p02_data.png". Graphics saved as "p02_nearest.png". nearest_interp_1d_test02(): Interpolate data from test_interp() problem #3. Number of data points = 11 Data array: Row: 1 2 Col 1: 0 0 2: 2 10 3: 3 10 4: 5 10 5: 6 10 6: 8 10 7: 9 10.5 8: 11 15 9: 12 50 10: 14 60 11: 15 85 L2 interpolation error averaged per interpolant node = 0 Graphics saved as "p03_data.png". Graphics saved as "p03_nearest.png". nearest_interp_1d_test02(): Interpolate data from test_interp() problem #4. Number of data points = 8 Data array: Row: 1 2 Col 1: 0 0 2: 0.05 0.7 3: 0.1 1 4: 0.2 1 5: 0.8 0.3 6: 0.85 0.05 7: 0.9 0.1 8: 1 1 L2 interpolation error averaged per interpolant node = 0 Graphics saved as "p04_data.png". Graphics saved as "p04_nearest.png". nearest_interp_1d_test02(): Interpolate data from test_interp() problem #5. Number of data points = 9 Data array: Row: 1 2 Col 1: 0 0 2: 0.1 0.9 3: 0.2 0.95 4: 0.3 0.9 5: 0.4 0.1 6: 0.5 0.05 7: 0.6 0.05 8: 0.8 0.2 9: 1 1 L2 interpolation error averaged per interpolant node = 0 Graphics saved as "p05_data.png". Graphics saved as "p05_nearest.png". nearest_interp_1d_test02(): Interpolate data from test_interp() problem #6. Number of data points = 49 Data array: Row: 1 2 Col 1: 595 0.644 2: 605 0.622 3: 615 0.638 4: 625 0.649 5: 635 0.652 6: 645 0.639 7: 655 0.646 8: 665 0.657 9: 675 0.652 10: 685 0.655 11: 695 0.644 12: 705 0.663 13: 715 0.663 14: 725 0.668 15: 735 0.676 16: 745 0.676 17: 755 0.686 18: 765 0.679 19: 775 0.678 20: 785 0.683 21: 795 0.694 22: 805 0.699 23: 815 0.71 24: 825 0.73 25: 835 0.763 26: 845 0.812 27: 855 0.907 28: 865 1.044 29: 875 1.336 30: 885 1.881 31: 895 2.169 32: 905 2.075 33: 915 1.598 34: 925 1.211 35: 935 0.916 36: 945 0.746 37: 955 0.672 38: 965 0.627 39: 975 0.615 40: 985 0.607 41: 995 0.606 42: 1005 0.609 43: 1015 0.603 44: 1025 0.601 45: 1035 0.603 46: 1045 0.601 47: 1055 0.611 48: 1065 0.601 49: 1075 0.608 L2 interpolation error averaged per interpolant node = 0 Graphics saved as "p06_data.png". Graphics saved as "p06_nearest.png". nearest_interp_1d_test02(): Interpolate data from test_interp() problem #7. Number of data points = 4 Data array: Row: 1 2 Col 1: 0 1 2: 1 2 3: 4 2 4: 5 1 L2 interpolation error averaged per interpolant node = 0 Graphics saved as "p07_data.png". Graphics saved as "p07_nearest.png". nearest_interp_1d_test02(): Interpolate data from test_interp() problem #8. Number of data points = 12 Data array: Row: 1 2 Col 1: -1 1 2: -0.8 0.64 3: -0.6 0.36 4: -0.4 0.16 5: -0.2 0.04 6: 0 0 7: 0.2 0.04 8: 0.20001 0.05 9: 0.4 0.16 10: 0.6 0.36 11: 0.8 0.64 12: 1 1 L2 interpolation error averaged per interpolant node = 0 Graphics saved as "p08_data.png". Graphics saved as "p08_nearest.png". nearest_interp_1d_test(): Normal end of execution. 14-Oct-2022 14:38:01