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: Michael Goffioul
Subject: Re: Can you force Octave to print?
Date: Fri, 14 Jun 2013 20:28:38 -0400

On Fri, Jun 14, 2013 at 8:18 PM, Jeffrey <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.

Michael.


reply via email to

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