From help-request at octave dot org Mon Oct 3 10:34:09 2005 Subject: Re: repmat (was "Computing distance matrix robustly") From: "John W. Eaton" To: Tom Holroyd Cc: Mike Miller , help@octave.org Date: Mon, 3 Oct 2005 11:33:56 -0400 On 3-Oct-2005, Tom Holroyd wrote: | | > Is there an advantage to using repmat instead of kron as follows: | > kron(ones(m, n), X) | > vs. | > repmat(X, m, n) | | In 2.9.3 kron is built-in so it's a huge winner. But repmat calls kron (at least in some cases) so the speed difference should not be too large. I think repmat is a better mnemonic than kron, so using repmat makes the code easier to follow. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------