08-Oct-2025 11:32:21 opt_sample_test(): MATLAB/Octave version 6.4.0 opt_sample() estimates the minimum and maximum of a function f(x) over the interval [a,b] using n random sample points. f(x) = "humps_fun(x)" 0 <= x <= 2 Using 11 sample values f( 1.886816155863113)= -4.618046224906853, f( 0.3143047564810646)= 94.60547239097271 Using 101 sample values f( 1.945871981047359)= -4.750251191901711, f( 0.3129899597603121)= 94.94084374542317 Using 1001 sample values f( 1.997983315196045)= -4.851508675790825, f( 0.3045921631194921)= 96.32435097524204 Using 10001 sample values f( 1.999862679728916)= -4.85492350956507, f( 0.3003638697715838)= 96.50140718167584 Using 100001 sample values f( 1.999997124276296)= -4.855167202156634, f( 0.3003522423088236)= 96.50140310379412 f(x) = "x/10 + cos(x) + sin(1.0) + pi" -10 <= x <= 10 Using 10001 sample values f( -9.528280896398112)= 2.035587197418701, f( 6.38241979674955)= 5.616385915325615 opt_sample_test(): Normal end of execution. 08-Oct-2025 11:32:21