28-Jul-2021 17:43:16 vandermonde_interp_1d_test(): MATLAB/Octave version 9.9.0.1467703 (R2020b). Test vandermonde_interp_1d(). The R8LIB library is needed. This test needs the TEST_INTERP library as well. VANDERMONDE_COEF_1D_TEST VANDERMONDE_COEF_1D sets the Vandermonde coefficients for 1D interpolation. Interpolation data: 1: 0 24 2: 1 0 3: 2 0 4: 3 0 5: 4 0 Vandermonde interpolant coefficients: 1: 24 2: -50 3: 35 4: -10 5: 1 Vandermonde interpolant polynomial: = +1.000000 * x^4 -10.000000 * x^3 +35.000000 * x^2 -50.000000 * x +24.000000 VANDERMONDE_MATRIX_1D_TEST VANDERMONDE_MATRIX_1D sets the Vandermonde matrix for 1D interpolation. Vandermonde matrix: Col: 1 2 3 4 Row 1 : 1 -1 1 -1 2 : 1 2 4 8 3 : 1 3 9 27 4 : 1 5 25 125 vandermonde_value_1d_test vandermonde_value_1d evaluates a Vandermonde interpolant. The Vandermonde interpolant: = +1.000000 * x^4 -10.000000 * x^3 +35.000000 * x^2 -50.000000 * x +24.000000 Vandermonde interpolant values: 1: 0 24 2: 0.333333 10.8642 3: 0.666667 3.45679 4: 1 0 5: 1.33333 -0.987654 6: 1.66667 -0.691358 7: 2 0 8: 2.33333 0.493827 9: 2.66667 0.493827 10: 3 0 11: 3.33333 -0.691358 12: 3.66667 -0.987654 13: 4 0 14: 4.33333 3.45679 15: 4.66667 10.8642 16: 5 24 VANDERMONDE_INTERP_1D_TEST01: 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 Condition of Vandermonde matrix is 2.58154e+24 [Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.091211e-27.] [> In vandermonde_interp_1d_test01 (line 42) In vandermonde_interp_1d_test (line 39) In run (line 91) ] L2 interpolation error averaged per interpolant node = 0.000352306 Normalized length of piecewise linear interpolant = 3.13553 Normalized length of polynomial interpolant = 559.468 Created plot file "p01_data.png". Created plot file "p01_poly.png". VANDERMONDE_INTERP_1D_TEST01: 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 Condition of Vandermonde matrix is 1.89225e+26 [Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.481751e-35.] [> In vandermonde_interp_1d_test01 (line 42) In vandermonde_interp_1d_test (line 39) In run (line 91) ] L2 interpolation error averaged per interpolant node = 25.839 Normalized length of piecewise linear interpolant = 2.66086 Normalized length of polynomial interpolant = 1.54184e+08 Created plot file "p02_data.png". Created plot file "p02_poly.png". VANDERMONDE_INTERP_1D_TEST01: 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 Condition of Vandermonde matrix is 1.69207e+14 L2 interpolation error averaged per interpolant node = 4.30509e-10 Normalized length of piecewise linear interpolant = 1.68472 Normalized length of polynomial interpolant = 4.30657 Created plot file "p03_data.png". Created plot file "p03_poly.png". VANDERMONDE_INTERP_1D_TEST01: 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 Condition of Vandermonde matrix is 356159 L2 interpolation error averaged per interpolant node = 2.20858e-14 Normalized length of piecewise linear interpolant = 3.25908 Normalized length of polynomial interpolant = 5.38186 Created plot file "p04_data.png". Created plot file "p04_poly.png". VANDERMONDE_INTERP_1D_TEST01: 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 Condition of Vandermonde matrix is 4.06242e+06 L2 interpolation error averaged per interpolant node = 2.69788e-12 Normalized length of piecewise linear interpolant = 3.2218 Normalized length of polynomial interpolant = 37.1961 Created plot file "p05_data.png". Created plot file "p05_poly.png". VANDERMONDE_INTERP_1D_TEST01: 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 Condition of Vandermonde matrix is 3.36391e+146 [Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 8.891174e-160.] [> In vandermonde_interp_1d_test01 (line 42) In vandermonde_interp_1d_test (line 39) In run (line 91) ] L2 interpolation error averaged per interpolant node = 0.0299751 Normalized length of piecewise linear interpolant = 2.68209 Normalized length of polynomial interpolant = 16.4248 Created plot file "p06_data.png". Created plot file "p06_poly.png". VANDERMONDE_INTERP_1D_TEST01: 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 Condition of Vandermonde matrix is 367.189 L2 interpolation error averaged per interpolant node = 2.77556e-16 Normalized length of piecewise linear interpolant = 2.63961 Normalized length of polynomial interpolant = 3.36731 Created plot file "p07_data.png". Created plot file "p07_poly.png". VANDERMONDE_INTERP_1D_TEST01: 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 Condition of Vandermonde matrix is 1.01468e+09 L2 interpolation error averaged per interpolant node = 2.00461e-11 Normalized length of piecewise linear interpolant = 2.31939 Normalized length of polynomial interpolant = 23167 Created plot file "p08_data.png". Created plot file "p08_poly.png". vandermonde_interp_1d_test(): Normal end of execution. 28-Jul-2021 17:43:26