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

Home » Public Forums » archive » Re: Create new arrays from series of subsequent integers in 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: Create new arrays from series of subsequent integers in an existing array [message #48814 is a reply to message #48813] Tue, 23 May 2006 15:11 Go to previous messageGo to previous message
vorticitywolfe is currently offline  vorticitywolfe
Messages: 19
Registered: January 2006
Junior Member
Thank you both for your help! In regards to JD's saving the output
arrays with pointers... I have never used pointers and believe this is
a case in which they are necessary.

After writing a long, drawn out explanation of where I was stuck with
pointers I ended up figuring them out. Just in case anyone new to
pointers wants to know how to get variables from an example such as the
above threads, use something like this:

x= ptrarr(3)

for i = 1L, n_elements(h) - 1L do begin
t=ri[ri[i]:ri[i+1]-1]
x[i] = PTR_NEW( t,/allocate_heap )
endfor

print,*x(2)

and you will have your varying size arrays of a larger array segmented
into different subscripts of x.

I'm sure there may be a better way to do this, but it makes sense to me.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: SAVE files with /ROUTINES for Previous Versions
Next Topic: PLOTHIST and tick marks

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

Current Time: Sat Oct 11 07:09:52 PDT 2025

Total time taken to generate the page: 1.19722 seconds