|
From: | Jordi Gutierrez Hermoso |
Subject: | Re: 3D array index as the element itself? |
Date: | Wed, 18 Apr 2007 19:03:24 -0500 |
On 18/04/07, Jordi Gutierrez Hermoso <address@hidden> wrote:
On 18/04/07, John W. Eaton <address@hidden> wrote: > I'm not sure that this is what the OP really wants, but this works in > 2.9.10: > > tmp(1,1,1,:) = 1:3; > r = repmat (tmp, [3,3,3]) > > you can use any dimensions, not just [3,3,3] here. > Ooh, is that a new feature of repmat in 2.9.10? The documentation in 2.9.9 seems to imply that repmat only works on matrices, not N-d arrays. Hm, once Debian devs fix the problems with the 'forge and the 2.9.10 packages, I'll upgrade.
No, never mind. I see this usage of repmat works in 2.9.9 (and I also see I was confused about the source of some of the functions; I thought that meshgrid was a 'forge function, but I see now it isn't). The only problem in 2.9.9 is that the help documentation doesn't reflect the fact that repmat works on N-d arrays... - Jordi G. H.
[Prev in Thread] | Current Thread | [Next in Thread] |