08-Oct-2025 14:09:30 quad_monte_carlo_test(): MATLAB/Octave version 6.4.0 quad_monte_carlo() is an interactive program which uses n random samples to estimate the integral of a function f(x) over the interval [a,b]. Estimate integral ( 0.000000 < x < 1.000000 ) x.^2 dx quad_monte_carlo: n = 100, integral estimate q = 0.3695053153644817 Estimate integral ( 0.0 < x < 2.0 ) sqrt(x) dx quad_monte_carlo: n = 1000, integral estimate q = 1.90386320708799 Estimate integral ( 0.0 < x < 2.0 ) humps(x) dx quad_monte_carlo: n = 1, integral estimate q = 174.8442535168483 quad_monte_carlo: n = 2, integral estimate q = 20.96196187607628 quad_monte_carlo: n = 4, integral estimate q = 28.84942511082552 quad_monte_carlo: n = 8, integral estimate q = 39.53496469315967 quad_monte_carlo: n = 16, integral estimate q = 14.98427746712524 quad_monte_carlo: n = 32, integral estimate q = 32.54958706491134 quad_monte_carlo: n = 64, integral estimate q = 35.323734782182 quad_monte_carlo: n = 128, integral estimate q = 29.66270156311627 quad_monte_carlo: n = 256, integral estimate q = 27.78833025553751 quad_monte_carlo: n = 512, integral estimate q = 31.52328612057366 quad_monte_carlo: n = 1024, integral estimate q = 30.1879025673871 quad_monte_carlo: n = 2048, integral estimate q = 29.33554802242848 quad_monte_carlo: n = 4096, integral estimate q = 29.42329319198944 quad_monte_carlo: n = 8192, integral estimate q = 29.40478438342747 quad_monte_carlo: n = 16384, integral estimate q = 29.04137380387063 quad_monte_carlo: n = 32768, integral estimate q = 29.69985830103232 quad_monte_carlo: n = 65536, integral estimate q = 29.2271232288426 quad_monte_carlo: n = 131072, integral estimate q = 29.39894482184431 quad_monte_carlo: n = 262144, integral estimate q = 29.24573123158135 quad_monte_carlo: n = 524288, integral estimate q = 29.44788953496237 quad_monte_carlo: n = 1048576, integral estimate q = 29.26620045015228 quad_monte_carlo_test(): Normal end of execution. 08-Oct-2025 14:09:31