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

Home » Public Forums » archive » Re: How do I add an array to the end of an existing array?
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: How do I add an array to the end of an existing array? [message #55072] Sun, 29 July 2007 12:44 Go to previous message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
On Jul 28, 12:00 am, snudge42 <snudg...@gmail.com> wrote:
> I want to do something which I'm sure is very simple. I have an array
> such as:
>
> 0 0
> 0 0
> 0 0
>
> and want to add a similar array to get
>
> 0 0
> 0 0
> 0 0
> 0 0
> 0 0
> 0 0
>
Note that for array operations, making examples with all zeroes is
likely to result in more confusion than not. Here's a relevant trick
to what I think your question was:
a=[[1,2],[3,4],[5,6]]
; this is one move:
print,rebin(a,2,6)
> 1 2
> 1 2
> 3 4
> 3 4
> 5 6
; this is another
print,[[a],[a]]
> 1 2
> 3 4
> 5 6
> 1 2
> 3 4
> 5 6

Note that your example with all 0's, could be satisfied by either of
these very different transforms.

Good luck,

Edward H.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Derivative along one dimension of a data cube?
Next Topic: Runtime error woes

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

Current Time: Fri Oct 10 12:17:27 PDT 2025

Total time taken to generate the page: 0.32474 seconds