MATLAB Functions | Help Desk |
waitbar
Display waitbarh = waitbar(x,'title')A waitbar shows what percentage of a calculation is complete, as the calculation proceeds.
h = waitbar(x,'title')
creates and displays a waitbar of fractional length x
. The handle to the waitbar Figure is returned in h
. x
should be between 0 and 1. Each subsequent call to waitbar, waitbar(x)
, extends the length of the bar to the new position x
.
waitbar
is typically used inside a for
loop that performs a lengthy computation. For example,
h = waitbar(0,'Please wait...'); for i=1:100, % computation here % waitbar(i/100) endclose
(h)