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

Home » Public Forums » archive » Increments and Decrements
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Increments and Decrements [message #93784] Fri, 14 October 2016 15:31 Go to next message
smnadoum is currently offline  smnadoum
Messages: 24
Registered: June 2016
Junior Member
Can anyone help with the following?

C is a [4,5,3]

1)Starting from the first element in array 'c', I need to output every 5th element and then output in 'e'.

2)Starting from the last element in 'c', I need to count backwards using decrements and output every 5th element in 'c' and then output in 'f'.

How do I do this in IDL? Thanks
Re: Increments and Decrements [message #93785 is a reply to message #93784] Sat, 15 October 2016 00:29 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le samedi 15 octobre 2016 00:31:07 UTC+2, Cheryl a écrit :
> Can anyone help with the following?
>
> C is a [4,5,3]
>
> 1)Starting from the first element in array 'c', I need to output every 5th element and then output in 'e'.
>
> 2)Starting from the last element in 'c', I need to count backwards using decrements and output every 5th element in 'c' and then output in 'f'.
>
> How do I do this in IDL? Thanks

e = (reform(c,c.length))[0:*:5]
f = (reform(c,c.length))[-1:0:-5]

alx.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Mac Yosemite X Window Display
Next Topic: Any way to initialize mapping in IDL with WKT or a Proj.4 string?

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

Current Time: Wed Oct 08 15:10:57 PDT 2025

Total time taken to generate the page: 0.00517 seconds