waitbar — Create or update a waitbar progress figure.
waitbar creates a lightweight progress figure or updates an existing waitbar handle. RunMat stores progress and message state on the figure so scripts can keep MATLAB-style progress workflows without requiring a native modal UI.
Syntax
h = waitbar(x)
h = waitbar(x, msg)
h = waitbar(x, h)
h = waitbar(x, h, msg, Name, Value, ...)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
x | NumericScalar | Yes | — | Progress fraction. Finite values are clamped into [0, 1]. |
x | NumericScalar | Yes | — | Progress fraction. |
args | Any | Variadic | — | Message text, waitbar figure handle, and figure-style property/value pairs. |
Returns
| Name | Type | Description |
|---|---|---|
h | NumericScalar | Waitbar figure handle. |
Errors
| Identifier | When | Message |
|---|---|---|
RunMat:waitbar:InvalidArgument | Progress, handle, message, or property/value arguments are invalid. | waitbar: invalid argument |
GPU memory and residency
waitbar manages UI metadata only. It does not gather, copy, or mutate GPU-resident arrays.
Example
Create and update a waitbar
h = waitbar(0.25, 'Loading');
waitbar(0.75, h, 'Almost done');Expected output:
% h remains the waitbar figure handleUsing waitbar with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how waitbar changes the result.
Run a small waitbar example, explain the result, then change one input and compare the output.
Related Plotting functions
2D Charts
area · bar · errorbar · heatmap · hist · histogram · loglog · pie · plot · scatter · semilogx · semilogy · stairs · stem
Other
addpoints · ancestor · animatedline · axes · barh · cla · clf · colorcube · colororder · copyobj · daspect · datacursormode · dataTipTextRow · fcontour · figure · fill3 · findobj · fsurf · gobjects · groot · hgload · hgsave · hidden · histogram2 · hold · line · linkaxes · openfig · opengl · pan · parula · patch · plotmatrix · plotyy · polarhistogram · polarplot · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · stackedplot · subtitle · suptitle · textscatter · textscatter3 · triplot · wordcloud · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zoom
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.