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 #54864 is a reply to message #48962] Tue, 17 July 2007 00:24 Go to previous messageGo to previous message
Peter Clinch is currently offline  Peter Clinch
Messages: 98
Registered: April 1996
Member
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??

Not so elegant, but workable, is:

c=bytarr(10,15)

c[*,0:9] = a
c[*,10:14] = b

Pete.
--
Peter Clinch Medical Physics IT Officer
Tel 44 1382 660111 ext. 33637 Univ. of Dundee, Ninewells Hospital
Fax 44 1382 640177 Dundee DD1 9SY Scotland UK
net p.j.clinch@dundee.ac.uk http://www.dundee.ac.uk/~pjclinch/
[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: Wed Oct 08 17:32:11 PDT 2025

Total time taken to generate the page: 0.00609 seconds