function z=edm(w,p) % A=edm(w,p) % Input: w, number of points by dimension % Input: p is number of points by dimension % Ouput: Matrix z, number points in w by number pts in p % which is the distance from one point to another [S,R] = size(w); [Q,R2] = size(p); p=p'; if (R ~= R2), error('Inner matrix dimensions do not match.\n'), end z = zeros(S,Q); if (Q