comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » repeating elements of an array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: repeating elements of an array [message #89349 is a reply to message #89347] Sun, 24 August 2014 13:13 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
First, the original array:

IDL> a = findgen(10)*10-50

Now, repeat each element of the array:

IDL> aRepeat= rebin(a, 50, /sample)

Replicating the array is a little more involved, but still pretty straightforward:

IDL> aReplicate = reform(a#replicate(1., 5), 50)

Fun with reform and rebin!
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: CPU overload when saving a file
Next Topic: Add event handling to an ENVI display group

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:42:56 PDT 2025

Total time taken to generate the page: 0.64317 seconds