Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: repeating array elements
Replies: 5   Last Post: Jan 26, 2013 10:49 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Matt J

Posts: 4,992
Registered: 11/28/09
repeating array elements
Posted: Jan 26, 2013 10:49 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Adam Chapman <adamchapman1985@hotmail.co.uk> wrote in message <63207d27-e8c5-49a1-b1ed-f892f49929dd@googlegroups.com>...
> 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

==============

It's puzzling, of course, why you would want to simply copy data this way. It just takes up more memory.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.