10-Nov-2022 11:49:52 bernstein_approximation_test(): MATLAB/Octave version 4.2.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] Graphics saved as "bernstein_sine_00" Graphics saved as "bernstein_sine_01" Graphics saved as "bernstein_sine_02" Graphics saved as "bernstein_sine_03" Graphics saved as "bernstein_sine_04" Graphics saved as "bernstein_sine_05" Graphics saved as "bernstein_sine_06" Graphics saved as "bernstein_sine_07" Graphics saved as "bernstein_sine_08" Graphics saved as "bernstein_sine_09" Graphics saved as "bernstein_sine_10" Graphics saved as "bernstein_heaviside_01" Graphics saved as "bernstein_heaviside_03" Graphics saved as "bernstein_heaviside_05" Graphics saved as "bernstein_heaviside_07" Graphics saved as "bernstein_heaviside_09" Graphics saved as "bernstein_heaviside_11" Graphics saved as "bernstein_heaviside_13" Graphics saved as "bernstein_heaviside_15" Graphics saved as "bernstein_heaviside_17" Graphics saved as "bernstein_heaviside_19" bernstein_approximation_test(): Normal end of execution. 10-Nov-2022 11:50:57