MATLAB: How to erase something I printed in the command window (to print something else instead)

output

Hi,
Doesn't it sometimes bother you to let something run for hours and not see the progress, so that all you've got is to believe the 'busy' status of MATLAB?
Well,then it could be very friendly to display completion percentage. But all that i know is to fprintf something and never erase it. Now if i have many tasks running i'd like to know their status without having to type a list of percentages on the screen. For that i wanna know how to delete characters from the command window.
Thnx!

Best Answer

You could use waitbar(). It's much nicer.
If you really want to erase what you've already printed, use
fprintf('\b')
For example,
fprintf('%%43');fprintf('\b\b\b');fprintf('%%45')
Related Question