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

Home » Public Forums » archive » Re: 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
Re: ARRAYS [message #2854] Thu, 08 September 1994 08:45 Go to previous message
saken is currently offline  saken
Messages: 6
Registered: November 1993
Junior Member
In article <34n95u$ise@hammer.msfc.nasa.gov>, mallozzi@ssl.msfc.nasa.gov writes:
|> 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:
|>
|> (rest deleted)


Try using the REFORM function:

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

REFORM gets rid of dimensions where there is only one element of
the array.

jon
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Problem with PLOT limits in IDL v3.6
Next Topic: Re: XYOUTS overwrites

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

Current Time: Wed Oct 08 17:58:04 PDT 2025

Total time taken to generate the page: 0.00344 seconds