Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



repeating array elements
Posted:
Jan 25, 2013 4:34 PM


Can anybosy think of a fast way to do coppy each element of an array n times row or column wise?
For example, changing the array
1 2 3 4 5 6
to
1 1 2 2 3 3 1 1 2 2 3 3 4 4 5 5 6 6 4 4 5 5 6 6
I'm struggling to think of a way to vectorise this.
If anybody could help I'd be very greatful



