07-Jan-2022 18:16:29 cube_surface_distance_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test cube_surface_distance() The mean distance between two random points on the surface of a cube can be computed as: mu = ( 5 mu_diff + mu_same ) / 6 where: mu_diff = mean distance, points are on different faces mu_same = mean distance, points are on same face. Using N = 10000 sample points, Exact mean distance (diff) = 0.92639 Exact mean distance (same) = 0.521405 Exact mean distance = 0.858893 Estimated mean distance = 0.862766 Estimated variance = 0.0945837 Graphics saved in "cube_surface_distance_histogram.png" cube_surface_distance_test(): Normal end of execution. 07-Jan-2022 18:16:34