FUNCTION REFERENCE
waitbar
Show or update a progress bar window.
Show or update a progress bar window.
Syntax
h = waitbar(x, message)Syntax
h = waitbar(x, message, 'Name', title)Syntax
waitbar(x, h)Syntax
waitbar(x, h, message)x is the fraction done, from 0 to 1 (values outside are clamped). The first form opens a progress window; later calls with h move the bar and can change the message. close(h) or delete(h) removes the window. Without a dialog host, h is a hidden figure handle.
Example
h = waitbar(0, 'Working...'); for k = 1:100, waitbar(k/100, h); end, close(h)Example
h = waitbar(0, 'Run', 'Visible', 'off'); p = get(h, 'OuterPosition'); set(h, 'OuterPosition', p, 'Visible', 'on'); close(h)get and set accept Position, OuterPosition, Units and Visible; without a dialog host the values are stored and nothing is shown.
Differences from MATLAB: Figure properties other than Name, Position, OuterPosition, Units and Visible (CreateCancelBtn, Color) are ignored. Changing Units does not convert Position.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.