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

Home » Public Forums » archive » Re: Arrays merging
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 merging [message #47494 is a reply to message #47493] Wed, 15 February 2006 09:11 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Julio wrote:
> Hello, I have an easy question. I have two arrays:
>
> help, array1
> help, array2
>
> ARRAY1 STRING = Array[15, 4]
> ARRAY2 STRING = Array[15, 6]
>
> I need to merge these two arrays into 1. I'm using:
>
> Array3 = [array1, array2]
>
> But it doesn't work, since the dimensions do not agree. How can I do to
> concatenate these two arrays? How can I fill with zero values the
> array1 to match it with array2??

Try array3 = [[array1],[array2]]

IDL> x1=strarr(15,4)
IDL> x2=strarr(15,6)
IDL> help, x1, x2
X1 STRING = Array[15, 4]
X2 STRING = Array[15, 6]
IDL> help, [[x1],[x2]]
<Expression> STRING = Array[15, 10]

paulv


--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Arrays merging
Next Topic: Newbie to satellite data and IDL

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

Current Time: Sun Oct 12 04:59:32 PDT 2025

Total time taken to generate the page: 1.11411 seconds