13-Dec-2022 09:32:39 square_surface_distance_test(): MATLAB/Octave version 4.2.2 Test square_surface_distance() The mean distance between two random points on the surface of a square can be computed as: mu = ( 3 mu_diff + mu_same ) / 4 where: mu_diff = mean distance, points are on different sides mu_same = mean distance, points are on same side. Using N = 10000 sample points, Exact mean distance (diff) = 0.869009 Exact mean distance (same) = 0.333333 Exact mean distance = 0.73509 Estimated mean distance = 0.735471 Estimated variance = 0.128379 Graphics saved in "square_surface_distance_histogram.png" square_surface_distance_test(): Normal end of execution. 13-Dec-2022 09:32:40