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

Home » Public Forums » archive » [Q] How does one EXPAND an ARRAY in IDL ? i.e opposite of sub-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: [Q] How does one EXPAND an ARRAY in IDL ? i.e opposite of sub-array [message #3500 is a reply to message #3419] Thu, 26 January 1995 10:15 Go to previous message
velt is currently offline  velt
Messages: 19
Registered: June 1994
Junior Member
In article <1995Jan25.181418.25048@ptolemy-ethernet.arc.nasa.gov>, mombasa@kronos.arc.nasa.gov (Tarang Kumar Patel) writes:

>
> I am dealing with an ARRAY of structures, but the question applies to all
> arrays. I know one can take subarrays to shrink an array, but how about if one
> wants to extend the size of one how does one achive this.

The basic expansion:

mydata = [mydata, newstructure]

adds one element to the array mydata.

For general expansions you can always use temporary variables.
For example, for a 2-dimensional array of integers:

tmp = intarr( newx, newy)
tmp( 0, 0)= mydata
mydata = tmp

(You may want to clean up tmp afterwards)


Robert Velthuizen (velt@rad.usf.edu),
Digital Medical Imaging Program of the
H. Lee Moffitt Cancer Center and Research Institute at the
University of South Florida, Tampa FL 33612.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: [Q] How does one EXPAND an ARRAY in IDL ? i.e opposite of sub-array
Next Topic: Re: how to handle 3-D data

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

Current Time: Sat Oct 11 14:24:41 PDT 2025

Total time taken to generate the page: 0.08001 seconds