MATLAB Function Reference |
Syntax
h = waitbar(x,'title')
Description
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
.
Example
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)
voronoin | waitfor |