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 
Switch to threaded view of this topic Create a new topic Submit Reply
array concatenation [message #58503] Wed, 30 January 2008 07:56
Ryan. is currently offline  Ryan.
Messages: 77
Registered: March 2006
Member
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: moving axes around in 3D plots
Next Topic: error with ARROW

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

Current Time: Sat Oct 11 12:38:06 PDT 2025

Total time taken to generate the page: 0.56083 seconds