help-octave
[Top][All Lists]
Advanced

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

Re: Can you force Octave to print?


From: Torsten
Subject: Re: Can you force Octave to print?
Date: Sat, 15 Jun 2013 10:32:16 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

On 15.06.2013 02:28, Michael Goffioul wrote:
> On Fri, Jun 14, 2013 at 8:18 PM, Jeffrey <address@hidden
> <mailto:address@hidden>> wrote:
> 
>     Octave seems to be buffering its prints until it's done processing. Is
>     there a way to force it to print?
> 
>     I am solving a differential equation using ode45 and it takes a very
>     long
>     time to run (actually, it's very simple, but I'm running it for
>     thousands
>     of iterations). To get a status on it, I have the following lines in the
>     function which is called over and over by ode45:
>     tRound = floor(1000*t)/1000;
>     if mod(tRound, 100) == 0
>       fprintf('Timestep = %f at %s\n', t, datestr(clock));
>     fprintf('%f,', t);
> 
>     However, the output from the fprintf is not appearing until ode45 is
>     finished.
> 
>     Is there a command, or trick, which I can use to force octave to
>     print the
>     output when I say so?
> 
> 
> The problem is that the pager is enabled by default. Try "more off" to
> disable it. Any output should then appear immediately.
> 

I am not sure whether "more off" does the trick, the output would still
be buffered. Please try "page_output_immediately (1)"

>From the help for page_output_immediately:
"Query or set the internal variable that controls whether Octave
sends output to the pager as soon as it is available.  Otherwise,
Octave buffers its output and waits until just before the prompt
is printed to flush it to the pager."

Torsten




reply via email to

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