10-Aug-2024 07:45:08 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.307485467034214 Estimate integral ( 0.0 < x < 2.0 ) sqrt(x) dx quad_monte_carlo: n = 1000, integral estimate q = 1.856240409674573 Estimate integral ( 0.0 < x < 2.0 ) humps(x) dx quad_monte_carlo: n = 1, integral estimate q = -8.973738937526388 quad_monte_carlo: n = 2, integral estimate q = 83.61412095913492 quad_monte_carlo: n = 4, integral estimate q = 14.21681676869925 quad_monte_carlo: n = 8, integral estimate q = 37.46017203615281 quad_monte_carlo: n = 16, integral estimate q = 40.9868443662456 quad_monte_carlo: n = 32, integral estimate q = 37.90961683429341 quad_monte_carlo: n = 64, integral estimate q = 28.99766589560426 quad_monte_carlo: n = 128, integral estimate q = 30.76267060498862 quad_monte_carlo: n = 256, integral estimate q = 26.76507996694842 quad_monte_carlo: n = 512, integral estimate q = 26.86834424961968 quad_monte_carlo: n = 1024, integral estimate q = 29.64434015120203 quad_monte_carlo: n = 2048, integral estimate q = 28.7056163026523 quad_monte_carlo: n = 4096, integral estimate q = 28.15476421632259 quad_monte_carlo: n = 8192, integral estimate q = 29.45577406193911 quad_monte_carlo: n = 16384, integral estimate q = 29.48283664246615 quad_monte_carlo: n = 32768, integral estimate q = 29.08238990018963 quad_monte_carlo: n = 65536, integral estimate q = 29.25472219472647 quad_monte_carlo: n = 131072, integral estimate q = 29.37933722920883 quad_monte_carlo: n = 262144, integral estimate q = 29.38891527503218 quad_monte_carlo: n = 524288, integral estimate q = 29.31757310197181 quad_monte_carlo: n = 1048576, integral estimate q = 29.29727316461544 quad_monte_carlo_test(): Normal end of execution. 10-Aug-2024 07:45:08