help-octave
[Top][All Lists]
Advanced

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

Re: A "cycle" command for octave ?


From: Søren Hauberg
Subject: Re: A "cycle" command for octave ?
Date: Tue, 13 Sep 2005 17:20:13 +0200
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050912)

Hi,
I've written a single line of Fortran 95 so I don't know anything about this cycle command. It does however sound a lot like the "continue" command in Octave (or C/C++).

But I'm properly missing the obvious...

/Søren

Madhusudan Singh wrote:
Hi

I know that Matlab does not seem to offer this functionality, but I was wondering if a future version of octave could include the equivalent of a Fortran 95 cycle command ?

Basically what it does is go to the next iteration in a for or a while loop :

Fortran 95 :

do i = 1,10
if (f(a,i).eq.0.0) cycle
...
...
...
enddo

where f is a function and a is any argument.

I know it is possible to replicate this functionality by using an if-else block, but that sphaggetizes the code if the loop is very long and complicated.

Thanks



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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