Undocumented features, vol.2
29 septembre 2017
There is limited backspace capabilities in Matlab's fprintf
when started with
-nodesktop
.
For example:
>> fprintf('aze\n')
aze % OK
then
>> fprintf('aze\bz\n')
azz % OK
but
>> fprintf('aze') ; fprintf('\bz\n')
azez % NOK
works only with the full desktop environment loaded:
>> fprintf('aze') ; fprintf('\bz\n')
azz % OK
I tried this from https://blogs.mathworks.com/loren/2007/08/01/monitoring-progress-of-a-calculation/:
% Example Code for Printing Progress to the Command Window
fprintf(1,'here''s my integer: ');
for i=1:9
fprintf(1,'\b%d',i); pause(.1)
end
fprintf('\n')
And the behaviour is the the same (no backspace in -nodesktop
mode).