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

Home » Public Forums » archive » Re: number of iterations
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: number of iterations [message #68956] Sun, 06 December 2009 17:50 Go to previous message
Wasit.Weather is currently offline  Wasit.Weather
Messages: 62
Registered: February 2008
Member
On Dec 6, 7:37 pm, David Fanning <n...@dfanning.com> wrote:
> Elkunn writes:
>
> .
>
>> How can I do that in this example? I would like to have print the
>> number of iterations within that Repeat Loop.
>
>> Thanks
>>     ;E1 = Unit vector, known
>>     ; Z is  known matrix
>>     REPEAT BEGIN
>>         EC = Z##E1
>>         L = sqrt(EC[0]+EC[1])
>>         E1 = EC/L
>>         print,L
>>         ;Keep going until nothing is moved.
>>     ENDREP UNTIL L LT 1.2840277
>
>     ;E1 = Unit vector, known
>     ; Z is  known matrix
>     count = 0
>     REPEAT BEGIN
>         print, count++
>         EC = Z##E1
>         L = sqrt(EC[0]+EC[1])
>         E1 = EC/L
>         print,L
>         ;Keep going until nothing is moved.
>     ENDREP UNTIL L LT 1.2840277
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Wov!
Things are so simple, as long as you know how to do it!!!
thanks
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: number of iterations
Next Topic: Why doesn't IDL know the borders of Kazakhstan?

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

Current Time: Sat Oct 11 14:53:31 PDT 2025

Total time taken to generate the page: 0.00392 seconds