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 #93030 is a reply to message #93029] Wed, 13 April 2016 05:29 Go to previous messageGo to previous message
omar ali is currently offline  omar ali
Messages: 13
Registered: December 2015
Junior Member
بتاريخ الأربعاء، 13 أبريل، 2016 1:53:06 م UTC+2، كتب wlandsman:
> 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

Thanks wlandsman, it works
[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 17:31:12 PDT 2025

Total time taken to generate the page: 0.00343 seconds