Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 44a57478e44aacd6feb6b6f780eab143 > files > 304

ocaml-gpr-devel-1.2.1-2.mga6.x86_64.rpm

% Part of Ed Snelson's SPGP distribution

function D = dist(x0,x1)

% dist: compute pairwise distance matrix from two column vectors x0 and x1

warning(['To speed up gradient calculation compile mex' ...
         ' file dist.c'])

n0 = length(x0); n1 = length(x1);
D = repmat(x0,1,n1)-repmat(x1',n0,1);