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

Home » Public Forums » archive » Re: help with chunk indexing
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: help with chunk indexing [message #54641] Mon, 02 July 2007 05:42 Go to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
Here's a simpler way...

IDL> inds = [0,1,1,2,3,3 ,3 ,3]
IDL> n = [1,2,1,4]
IDL> c=[0,total(n,/cum,/int)]
IDL> print,indgen(n_elements(inds))-c[inds]
0 0
1 0 0
1 2 3

For the life of me, I can't remember how to transform n = [1,2,1,4]
==> inds = [0,1,1,2,3,3 ,3 ,3] - I spent ages reading the IDL function
list, but I can't find it...

many greetings,
Greg
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Get Latitude and Longitude from Tiff files
Next Topic: moxed format file i/o

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

Current Time: Wed Oct 08 15:52:00 PDT 2025

Total time taken to generate the page: 0.00383 seconds