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

NameTypeRequiredDefaultDescription
xNumericScalarYesProgress fraction. Finite values are clamped into [0, 1].
xNumericScalarYesProgress fraction.
argsAnyVariadicMessage text, waitbar figure handle, and figure-style property/value pairs.

Returns

NameTypeDescription
hNumericScalarWaitbar figure handle.

Errors

IdentifierWhenMessage
RunMat:waitbar:InvalidArgumentProgress, 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 handle

Using 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.

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.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.