[Top][All Lists]

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

Re: showing progress of a for loop in a function

From: novakyu
Subject: Re: showing progress of a for loop in a function
Date: Tue, 13 Nov 2007 17:02:14 -0800

On Nov 13, 2007 4:05 PM, Joshua Rigler <address@hidden> wrote:
> On Nov 13, 2007 3:42 PM, novakyu <address@hidden> wrote:
> > Hi,
> >
> > I have a function that executes a fairly time-consuming for loop, and
> > I would like to track progress of the loop, so that I know whether to
> > interrupt the function call or not
> >
> > I tried "disp(j)" and "fdisp(j)" (where j is the index I'm looping
> > over), but it looks like octave does not print the output until the
> > whole function finishes.
> >
> > Is there any other way to track how many loops it's gone through?
> Woohoo!  The one question I have an answer for:
> Turn off pagination ("more off"), or force Octave to display all output
> immediately ("page_output_immediately(1)").  You might also try placing
> "fflush(stdout)" after "disp(j)" in your code, but that's probably more
> trouble than it's worth.  Keep in mind, only the first solution works in
> the other leading product, if compatibility is an issue.

Thank you! That (the first solution) worked like a charm!

> Also, this question has been answered quite often on the list.  You
> should check out the search engine at:

I tried searching for an answer, but in hindsight, my choice of
keywords wasn't the best.



reply via email to

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