[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: disp in a cycle?
From: |
Stefano Ghirlanda |
Subject: |
Re: disp in a cycle? |
Date: |
Wed, 1 Sep 1999 11:52:55 -0400 (EDT) |
Hi,
> Suppose my program contains the lines:
>
> for i=1:10
> disp(i)
> <some operators>
> endfor
>
> Thus, I'd like to have the number of the current step displayed
> while the cycle goes on. But it happens that first the cycle
> runs "silently", but when it is already over I get a column of
> 1
> ...
> 10
>
> How can I fix this behavior?
disp(i)
fflush(stdout)
(stdout is buffered)
Cheers,
Stefano
Stefano Ghirlanda, Zoologiska Institutionen, Stockholms Universitet
Office: D554, Arrheniusv. 14, S-106 91 Stockholm, Sweden
Phone: +46 8 164055, Fax: +46 8 167715, Email: address@hidden
Support Free Science, look at: http://rerumnatura.zool.su.se
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------
- Re: disp in a cycle?,
Stefano Ghirlanda <=