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

Home » Public Forums » archive » Re: Counting the lengths of continuous numbers in an 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: Counting the lengths of continuous numbers in an array [message #61968 is a reply to message #61824] Mon, 11 August 2008 06:08 Go to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
>> IDL> aa = [a[0],a,0]
>> IDL> b = where( (aa-shift(aa,1)) ne 1)
>> IDL> c = b-shift(b,1)
>> IDL> print, c[1:*]
>>          4           2           1           2           3


While I can't seem to find it this second my tired and jet lagged
brain is telling me that there is an built-in idl function to
calculate array[*]-array[1:*], which should be equivalent to above.
Now to remember the function.

Cheers,

Brian
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: heartbeat timeout
Next Topic: Re: Can i avoid the loop,help me speed up,thanks

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

Current Time: Fri Oct 10 14:25:06 PDT 2025

Total time taken to generate the page: 0.39749 seconds