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

Home » Public Forums » archive » Re: Replicate array over columns - using transpose?
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: Replicate array over columns - using transpose? [message #79698 is a reply to message #79697] Thu, 22 March 2012 03:57 Go to previous messageGo to previous message
dplatten is currently offline  dplatten
Messages: 32
Registered: December 2007
Member
Hi Robin,

You can use a combination of REBIN and TRANSPOSE to do this. The following should work for you:

nElements = 5
nCols = 4

test = INDGEN(nElements)
print, test
0 1 2 3 4

print, REBIN(TRANSPOSE(test), nCols, nElements)
0 0 0 0
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4

Regards,

David
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: external string EXP for MATH_DOIT (ENVI)
Next Topic: Coyote graphics and resizeable draw widgets

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

Current Time: Sun Nov 30 00:57:52 PST 2025

Total time taken to generate the page: 1.20614 seconds