I have two vectors (single row matrices). Assume that we already know the length len.
len
A = [ x1 x2 x3 x4 x5 .... ] B = [ y1 y2 y3 y4 y5 .... ]
To add to @kol answer,
diff = A - B; distance = sqrt(sum(diff * diff')) % sum of squared diff
or
distance = norm(A-B);