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

Home » Public Forums » archive » Array concatenation
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: Array concatenation [message #54859 is a reply to message #48962] Tue, 17 July 2007 05:11 Go to previous messageGo to previous message
Conor is currently offline  Conor
Messages: 138
Registered: February 2007
Senior Member
On Jul 17, 3:28 am, Paolo_Grigis <pgri...@astro.phys.ethz.ch> wrote:
> Julio wrote:
>> Hi there,
>
>> I have a problem with array concatenation. Suppose:
>
>> A = bytarr(10, 10)
>> B = bytar(10, 5)
>
>> C=[A,B]
>
>> Sure, it doesn't work, because dimensions don't agree. But, I need to
>> join A and B. One possibility is to change the dimensions of array B
>> and fill missing lines with zeros. Is it possible??
>
>> comments welcome,
>> Best,
>> Julio
>
> Just use C=[[A],[B]]
>
> IDL> help,a,b,c
> A BYTE = Array[10, 10]
> B BYTE = Array[10, 5]
> C BYTE = Array[10, 15]
>
> Ciao,
> Paolo

I would go with Paolo's suggestion, unless you absolutely have to join
in left right, instead of up down. In that case, you could try
something like:

c = [[B],[bytarr(10,5)]]
D = [A,C]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL slow to load command prompt
Next Topic: The usage of PS_END

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

Current Time: Sun Oct 12 00:01:35 PDT 2025

Total time taken to generate the page: 0.22501 seconds