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

Home » Public Forums » archive » ARRAYS
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
ARRAYS [message #2860] Thu, 08 September 1994 08:04 Go to previous message
mallozzi is currently offline  mallozzi
Messages: 60
Registered: August 1994
Member
I must be missing something simple, but I sometimes find myself needing to
concatinate arrays as follows:

x = FINDGEN(10)
y = FINDGEN(4,20)
z = [x, y(1,*)]

This won't work because IDL sees y(1,*) as a 2-d array, and x is 1-d.
Is there an easy way to concatenate two "vectors" without looping through
the y-array and extracting the approriate elements like this:

temp = FLTARR(N_ELEMENTS(y))
for i=0,N_ELEMENTS(y)-1 do temp(i) = y(1,i)
z = [x,temp]

Thanks
Bob Mallozzi
mallozzi@ledzep.msfc.nasa.gov
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 3D overplotting??
Next Topic: Re: 3D overplotting??

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

Current Time: Sat Oct 11 10:29:19 PDT 2025

Total time taken to generate the page: 1.35878 seconds