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 #58501 is a reply to message #48962] Wed, 30 January 2008 08:38 Go to previous messageGo to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Jan 30, 3:56 pm, "Ryan." <rchug...@brutus.uwaterloo.ca> wrote:
> Hi All,
>
> I'm trying to add a 1x2 array to the end of an Nx2 array to obtain a (N
> +1)x2 array using the square bracket concatenation trick, but based on
> my limited understanding of it, I can't get it to work. I've looked
> at JD's tutorial on David's website but I still don't get it.
>
> Here is an example of what I want to do:
> IDL> array = [[1,2,3,4],[1,2,3,4]]
> IDL> print, array
> 1 2 3 4
> 1 2 3 4
>
> I want to add another pair to the array to get this:
> 1 2 3 4 5
> 1 2 3 4 5
>
> I want to execute a command similar to this one but I can't figure out
> the correct number of brackets:
> array = [[array], [[5,5]]]
>
> Thanks,
> Ryan.

You want:
array = [array, rebin([5,5],1,2)]

It's time to invoke that dimension juggling tutorial again! It's one
of JD's other tutorials on David's site.

http://www.dfanning.com/tips/rebin_magic.html

Thanks,
Chris
[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 19:26:27 PDT 2025

Total time taken to generate the page: 0.00544 seconds