|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
[SOLVED] Print inside loopIf I put printf() in a for loop, the message doesn't appear until the loop is finished. Is there any way to output a string before that?
|
|
|
Re: Print inside loopIt would be helpful if you could provide an example of the problem.
I'll try and guess that you need to include more off sometime prior to your loop to disable the pager. --judd On Wed, Oct 28, 2009 at 11:02 PM, RicardoCaruso <lorenzorodrigo2000@...> wrote: > > If I put printf() in a for loop, the message doesn't appear until the loop is > finished. Is there any way to output a string before that? > -- > View this message in context: http://www.nabble.com/Print-inside-loop-tp26105461p26105461.html > Sent from the Octave - General mailing list archive at Nabble.com. > > _______________________________________________ > Help-octave mailing list > Help-octave@... > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > Help-octave mailing list Help-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: Print inside loopThanks for answering.
I have something like this: for j=1:N printf("Iteration %d", j); %All of this strings appear when the function finish. % ... some operations that take quite a long time... end I don't want all the strings to be printed at the end.
|
|
|
Re: Print inside loopOn 29 Oct 2009, at 07:11, RicardoCaruso wrote: > > Thanks for answering. > I have something like this: > > for j=1:N > > printf("Iteration %d", j); %All of this strings appear when the > function finish. > > % ... some operations that take quite a long time... > > end > > I don't want all the strings to be printed at the end. have you disabled the pager before running your code? try typing the command more off at the beginning of your Octave session c. _______________________________________________ Help-octave mailing list Help-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: Print inside loopYes, that worked great!
I didn't know that command. Thanks!
|
|
|
Re: Print inside loopPlease try
page_screen_output (false) for i=1:10; disp(i);pause(1);end However this disable pager. If you would like to keep pager active, Please try for i=1:10; fprintf(stderr, "%d\n",i);pause(1);end without page_screen_output (false) Good luck! Tatsuro --- RicardoCaruso wrote: > > If I put printf() in a for loop, the message doesn't appear until the loop is > finished. Is there any way to output a string before that? > -- > View this message in context: http://www.nabble.com/Print-inside-loop-tp26105461p26105461.html > Sent from the Octave - General mailing list archive at Nabble.com. > > _______________________________________________ > Help-octave mailing list > Help-octave@... > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- GyaO! - Anime, Dramas, Movies, and Music videos [FREE] http://pr.mail.yahoo.co.jp/gyao/ _______________________________________________ Help-octave mailing list Help-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |