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

Home » Public Forums » archive » Re: array of Julian Days
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: array of Julian Days [message #63555 is a reply to message #63554] Tue, 11 November 2008 13:51 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Bulrush schrieb:
> Hello,
> I wanted to generate an array of Jdays of the year, and extract some
> of them according to 8 days of increment. However the following code I
> could think of does not work.
>
> Any help is appreciated.
>
> Jdays = Lindgen (366)
> Start_day= 265
> End_day = 361
>
> Daystep = 265
> ; collect the days
> WHILE Daystep LE 361and Daystep GT 265 Do Begin
> arr = Where (Jdays LE Daystep+8 and Jdays GT Daystep, count)
> Days = JDays[arr]
> EndWhile
>
> What is wrong with it? How can I get the job done?
>
> Thanks


Do you ask us to debug your code ?

I don't want to be ignorant but a breakpoint and by stepping yourself
through the code line by line does help you more than a ready to go
solution from us.

Anyway I want also give some hints. idl has builtin step methods (oh,
david what is the right word for that)

e.g a for loop can step
IDL> for i=0,50,8 do print,i
0
8
16
24
32
40
48


e.g. array indices can be stepped
IDL> print, (lindgen(50))[0:49:8]
0 8 16 24 32 40
48

cheers
Reimar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: convert 003 and 033 to strings
Next Topic: Workbench: Run idl several times

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

Current Time: Fri Oct 17 15:31:44 PDT 2025

Total time taken to generate the page: 0.47959 seconds