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

Home » Public Forums » archive » generating sequences
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: generating sequences [message #85842 is a reply to message #85841] Fri, 13 September 2013 12:10 Go to previous messageGo to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
On 2013-09-13 21:01, spluque@gmail.com wrote:
> Hi,
>
> I thought this should be very easy, but I cannot find how to do it IDL. Say we have a vector with a few starting values:
>
> a=[1, 12, 90]
>
> and we want to generate sequences of 3 numbers starting with these values, so that we end up with:
>
> [1, 2, 3, 12, 13, 14, 90, 91, 92]
>
> How is this done in IDL?

IDL> print,reform(transpose([[a],[a+1],[a+2]]),9)
1 2 3 12 13 14 90 91 92
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: strsplit vectorized
Next Topic: Re: Filled area curve

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

Current Time: Sun Oct 19 01:13:03 PDT 2025

Total time taken to generate the page: 3.59302 seconds