File Exchange

image thumbnail

wdisp: a pedestrian command window waitbar

version 1.0 (1.39 KB) by

Creates a waitbar-like display in the command window.



View License

Creates the equivalent of WAITBAR in the command window.
help wdisp
for a self-explanatory example - or type:

  for i=1:40
  tl=wdisp( 0,sprintf('time %c %s',t(rem(i,4)+1),datestr(now)));
% do some computation(s)
  tl=wdisp(tl,sprintf('count %3d %s',i,repmat('.',1,i)));
% do more computation(s)

Comments and Ratings (10)

I just thought of a small tweak in the code. By using the fprintf() function instead of disp(), it is possible to avoid the flickering of the command window when it already has a scrollbar (which is actually irritating).

Here the body of the modified function:

if ~nargin & ~nargout
    help wdisp;
elseif nargin == 1
elseif nargin == 2

And here a small example to use the modified version of wdisp():

tl=wdisp( 0,num2str(0));
for i=1:40
    tl=wdisp(tl,sprintf('count %3d %s',i,repmat('.',1,i)));
disp(' ');

Hope this helps someone :)

Burra Burra

Shame on me!

Burra Burra

Sorry for the previous, wrong rating

Burra Burra

1000 downloads to recover 5th place

I will resist

150 dl saterday night mode?

The Boss

Swathi krishna Burra

After click of matlab 7.0.(R14) icon command window displays after appearance of command prompt window closes automatically.I tried after reinstall of my operating system and matlab problem repeats the same?I cannot do my work due to this trouble ?please solve my problem

Chi Chi

UAU, > 500 downloads in less than a second. ?????????????????

zeus matlab heavens

Mrs. Klaublauer, this program is working perfectly for the rest of the world! What you are experiencing is a problem of your operating system. Please refrain from rating submissions just because you are frustrated - and please, add a valid email address to your review so the author can get in touch with you.

Lava Klaublauer

Matlab R12 displays boxes for char(8) instead of doing a backspace, breaking this. I don't know of any solution.


slightly changed example in <description>

corrected incomplete update

add <help> entry:
input must be a STRING

MATLAB Release
MATLAB 5.2 (R10)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video