matlab_distance


matlab_distance, a MATLAB code which estimates the distribution and expected value of the distance between a pair of points randomly selected from the surface or interior of a geometric object such as a circle, disk, sphere, cube, and between other nongeometric pairs of items.

Licensing:

The computer code and data files made available on this web page are distributed under the MIT license

Related Data and Programs:

annulus_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected in a circular annulus in 2D.

ball_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected in the unit ball in 3D.

ball_positive_distance, a MATLAB code which computes the expected value of the distance between a pair of points randomly selected in the unit positive ball in 3D.

box_distance, a MATLAB code which estimates the distribution and expected value of the distance between two points picked uniformly at random within a box.

circle_distance, estimates the typical distance between a pair of points randomly selected on the circumference of the unit circle in 2D.

circle_positive_distance, a MATLAB code which estimates the mean and variance of the distance between a random pair of points on the circumference of the unit positive circle in 2D.

cube_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected in the unit cube in 3D.

cube_surface_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected on the surface of the unit cube.

disk_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected in the unit disk in 2D.

disk_positive_distance, a MATLAB code which computes the expected value of the distance between a pair of points randomly selected in the unit positive disk in 2D.

ellipse_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected on the perimeter of an ellipse (x/a)^2+(y/b)^2=1.

hyperball_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected in the unit hyperball in M dimensions.

hyperball_positive_distance, a MATLAB code which computes the expected value of the distance between a pair of points randomly selected in the unit positive hyperball in M dimensions.

hypercube_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected in the M-dimensional unit hypercube.

hypercube_surface_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected on the surface of the unit hypercube in D dimensions.

hypersphere_distance, a MATLAB code which estimates the typical distance betweena pair of points randomly selected on the unit hypersphere in M dimensions.

hypersphere_positive_distance, a MATLAB code which computes the expected value of the distance between a pair of points randomly selected on the unit positive hypersphere in M dimensions.

jaccard_distance, a MATLAB code which computes the Jaccard distance between two sets.

levenshtein_distance, a MATLAB code which returns the Levenshtein distance between two strings.

line_distance, a MATLAB code which estimates the typical distance betweena pair of points randomly selected in the unit line segment in 1D.

normal01_multivariate_distance, a MATLAB code which estimates the typical distance betweena pair of points randomly selected from an isotropic standard normal distribution in M dimensions.

permutation_distance, a MATLAB code which estimates the expected value of the Ulam distance between a pair of randomly selected permutations of the same order.

polygon_distance, a MATLAB code which estimates the typical distance betweena pair of points randomly selected from a polygon in 2D.

rectangle_distance, a MATLAB code which estimates the distribution and expected value of the distance between two points picked uniformly at random within a rectangle.

sphere_distance, a MATLAB code which estimates the typical distance betweena pair of points randomly selected on the surface of the unit sphere in 3D.

sphere_positive_distance, a MATLAB code which computes the expected value of the distance between a pair of points randomly selected on the surface of the unit positive sphere in 3D.

square_distance, a MATLAB code which estimates the typical distance betweena pair of points randomly selected in the unit square in 2D.

square_surface_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected on the surface of the unit square.

subset_distance, a MATLAB code which estimates the expected value of the Hamming distance between a pair of randomly selected subsets of an M set.

triangle_distance, a MATLAB code which estimates the typical distance between a pair of points randomly selected in a triangle in 2D.


Last revised on 13 November 2023.