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

Home » Public Forums » archive » Looping over odd values only
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: Looping over odd values only [message #93029 is a reply to message #93028] Wed, 13 April 2016 04:53 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
IDL> for i=1,15,2 do print,i
1
3
5
7
9
11
13
15

On Wednesday, April 13, 2016 at 7:48:47 AM UTC-4, omar ali wrote:
> Hi,
> I need to make a for loop over odd values only. for example
> for n=0, 15 do begin
> If n eq odd value (1, 3, 5, ... etc) then begin
> calculations
> endif
> endfor
>
> Thanks in advance,
>
> Omar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can I make the headers of two fits files same in IDL?
Next Topic: Should SORT(Undefined) give an error message?

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

Current Time: Wed Oct 08 11:40:29 PDT 2025

Total time taken to generate the page: 0.00443 seconds