07-Jan-2022 15:58:06 bernstein_approximation_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test bernstein_approximation(). bernstein_poly_ab_approx_test(): bernstein_poly_ab_approx() evaluates the Bernstein polynomial approximant to a function F(X). As N, the polynomial degree increases, the norm of the error should decrease. Approximate y=sin(x) over the interval [1,3] N ||F-B|| / ||F| 0 0.815433 1 0.357447 2 0.175581 3 0.117312 4 0.0882046 5 0.0707012 6 0.059005 7 0.0506338 8 0.0443449 9 0.0394468 10 0.0355237 11 0.0323107 12 0.029631 13 0.0273619 14 0.0254157 15 0.023728 16 0.0222506 17 0.0209464 18 0.0197867 19 0.0187486 20 0.0178141 Approximate y=heaviside(x) over the interval [-1,+1] N ||F-B|| / ||F| 0 1 1 0.497006 2 0.497006 3 0.372257 4 0.372257 5 0.309883 6 0.309883 7 0.270899 8 0.270899 9 0.24361 10 0.24361 11 0.223143 12 0.223143 13 0.207062 14 0.207062 15 0.193997 16 0.193997 17 0.183109 18 0.183109 19 0.173854 20 0.173854 bernstein_poly_ab_approx_display(): bernstein_poly_ab_approx() evaluates the Bernstein polynomial approximant to a function F(X). This program displays the sequence of approximants to y=sin(x) over the interval [1,3] Bernstein approximant n = 0 Bernstein approximant n = 1 Bernstein approximant n = 2 Bernstein approximant n = 3 Bernstein approximant n = 4 Bernstein approximant n = 5 Bernstein approximant n = 6 Bernstein approximant n = 7 Bernstein approximant n = 8 Bernstein approximant n = 9 Bernstein approximant n = 10 Bernstein approximant n = 11 Bernstein approximant n = 12 Bernstein approximant n = 13 Bernstein approximant n = 14 Bernstein approximant n = 15 Bernstein approximant n = 16 Bernstein approximant n = 17 Bernstein approximant n = 18 Bernstein approximant n = 19 Bernstein approximant n = 20 Bernstein approximant n = 0 Bernstein approximant n = 1 Bernstein approximant n = 2 Bernstein approximant n = 3 Bernstein approximant n = 4 Bernstein approximant n = 5 Bernstein approximant n = 6 Bernstein approximant n = 7 Bernstein approximant n = 8 Bernstein approximant n = 9 Bernstein approximant n = 10 Bernstein approximant n = 11 Bernstein approximant n = 12 Bernstein approximant n = 13 Bernstein approximant n = 14 Bernstein approximant n = 15 Bernstein approximant n = 16 Bernstein approximant n = 17 Bernstein approximant n = 18 Bernstein approximant n = 19 Bernstein approximant n = 20 bernstein_approximation_test(): Normal end of execution. 07-Jan-2022 15:59:35