Calculates the L1 Distance between vectors (ie the City-Block distance). Assume X is an m-by-p matrix representing m points in p-dimensional space and Y is an n-by-p matrix representing another set of points in the same space. This function compute the m-by-n distance matrix D where D(i,j) is the L1 distance between X(i,:) and Y(j,:). The L1 distance between two vectors is defined as: d(x,y) = sum( abs(xi-yi) ); INPUTS X - m-by-p matrix of m p-bin histograms Y - n-by-p matrix of n p-bin histograms OUTPUTS D - m-by-n distance matrix EXAMPLE X=[randn(100,5)]; Y=randn(40,5)+2; D = dist_L1( [X; Y], [X; Y] ); im(D) DATESTAMP 29-Sep-2005 2:00pm See also DIST_EUCLIDEAN