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

Home » Public Forums » archive » Re: array concatenation in 2-D
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 in 2-D [message #59625 is a reply to message #59623] Fri, 04 April 2008 12:27 Go to previous messageGo to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"elwood" <epolomsk@uwsp.edu> wrote in message
news:16c1abdd-df95-48b4-8bde-3310d5d19409@c65g2000hsa.google groups.com...
>
> I have a loop which calculates two variables x[i] and y[i]
>
> At each iteration of the loop I calculate
> x and y
> And I'd like to concatenate x and y into a 2 column, unknown numbers
> of rows
> output array.
> I'd like to dynamically grow the output array at each interation.
>
> For example:
> x=1 y=5 on first iteration
> x=2, y=6 on 2nd iteration
> I want an output array that looks like the below:
>
> 1 5
> 2 6
>


If it is always 2 columns by whatever rows, then just concatenate the
arrays.
(you may have to do some tranposes)

If there is a variable number of columns, then as David says, pointers.

Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: No removal of "NaN" while plotting on both PLOT and iPLOT
Next Topic: Re: Tilde with IDL

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

Current Time: Fri Oct 10 21:24:29 PDT 2025

Total time taken to generate the page: 1.67893 seconds