help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Modifying counter within a loop


From: Fritz Sonnichsen
Subject: Modifying counter within a loop
Date: Thu, 10 May 2018 13:58:42 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

I have a stretch of code that contains a "for" loop. Within the loop, under certain circumstances,  it adds a constant to the loop counter for various reasons. This allows the code to "skip ahead". However after some investigation it is apparent that one cannot do this--that is, the loop counter is always set to the next consecutive value and ignores the added constant.

I assume this is a rule for the loop command (could not find this in the docs). Is there a way to override this behaviour?

Thanks
Fritz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]