Matlab - how to remove a line break when printing to screen? -


there example big big score

for 2 hours

and there need see how many more before end of

do output on screen of outer loop

but values ​​and there many, such 70 000

question - how remove line break when printing screen

not receive 70 000 lines

and see current display in 1 line?

try function, can use in place of disp string argument. displays command window, , remembers message has displayed. when call next time, first deletes previous output command window (using ascii backspace characters), prints new message.

in way see last message, , command window doesn't fill old messages.

function teleprompt(s) %teleprompt prints command window, over-writing last message % %       teleprompt(s) %       teleprompt()      % terminate % %       input s string.  persistent lastmsg  if isempty(lastmsg)     lastmsg = ''; end  if nargin == 0     lastmsg = [];     fprintf('\n');     return end  fprintf(repmat('\b', 1, numel(sprintf(lastmsg)))); fprintf(s);  lastmsg = s; 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -