[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
repmat (was "Computing distance matrix robustly")
From: |
Mike Miller |
Subject: |
repmat (was "Computing distance matrix robustly") |
Date: |
Mon, 3 Oct 2005 09:31:42 -0500 (CDT) |
On Sun, 2 Oct 2005, Søren Hauberg wrote:
D = sqrt( repmat(sX2, 1, n) + repmat(sX2', m, 1) - 2*XX );
Is there an advantage to using repmat instead of kron as follows:
kron(ones(m, n), X)
vs.
repmat(X, m, n)
They are pretty similar in speed from what I'm seeing. I've been using
kron for this sort of thing and wonder if I should be using repmat. The
newest version of kron is a fast .oct file but some older versions were
much slower.
Mike