RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
See all docs
Builtin Reference
    • addlistener
    • addParameter
    • addprop
    • assignin
    • builtin
    • cancel
    • class
    • clear
    • clearAllMemoizedCaches
    • clearCache
    • clearvars
    • dbclear
    • dbstack
    • dbstatus
    • dbtype
    • eval
    • evalc
    • evalin
    • feval
    • findprop
    • func2str
    • functions
    • get.p
    • getcallinfo
    • getmethod
    • inputname
    • inputParser
    • isa
    • ischar
    • isdeployed
    • iskeyword
    • ismethod
    • isobject
    • isstring
    • isUnderlyingType
    • isvalid
    • keyboard
    • loadobj
    • localfunctions
    • matlab.metadata.DynamicProperty.delete
    • memoize
    • metaclass
    • mfilename
    • mislocked
    • mlock
    • munlock
    • namelengthmax
    • narginchk
    • nargoutchk
    • new_object
    • notify
    • numArgumentsFromSubscript
    • onCleanup
    • parse
    • saveobj
    • set.p
    • stats
    • str2func
    • subsasgn
    • subsref
    • superclasses
    • underlyingType
    • verLessThan
    • version
    • which
    • who
    • whos

who — List variable names in workspaces or MAT-files using MATLAB-compatible filtering forms.

who returns visible variable names in the current workspace or in MAT-files, with MATLAB-compatible wildcard, regexp, and file-targeted query options.

Syntax

who(selector, ...) [discarded output]
names = who()
names = who(selector, ...)
names = who("-file", filename, selector, ...)
names = who("-regexp", pattern, ...)

Inputs

selector
Type
StringScalar
Required
Variadic
Description
Name filters, wildcard patterns, or options.
file_kw
Type
StringScalar
Required
Yes
Default
"-file"
Description
File mode option.
filename
Type
StringScalar
Required
Yes
Description
MAT-file path.
regexp_kw
Type
StringScalar
Required
Yes
Default
"-regexp"
Description
Regexp mode option.
pattern
Type
StringScalar
Required
Variadic
Description
Regular-expression patterns.
NameTypeRequiredDefaultDescription
selectorStringScalarVariadic—Name filters, wildcard patterns, or options.
file_kwStringScalarYes"-file"File mode option.
filenameStringScalarYes—MAT-file path.
regexp_kwStringScalarYes"-regexp"Regexp mode option.
patternStringScalarVariadic—Regular-expression patterns.

Returns

names
Type
Any
Description
Cell array of matching variable names.
NameTypeDescription
namesAnyCell array of matching variable names.

Errors

—
When
The '-file' option is provided without a filename.
Message
who: '-file' requires a filename
—
When
The '-file' option is provided more than once.
Message
who: '-file' may only be specified once
—
When
The '-regexp' option is provided without patterns.
Message
who: '-regexp' requires at least one pattern
IdentifierWhenMessage
—The '-file' option is provided without a filename.who: '-file' requires a filename
—The '-file' option is provided more than once.who: '-file' may only be specified once
—The '-regexp' option is provided without patterns.who: '-regexp' requires at least one pattern
—The '-regexp' option receives only empty patterns.who: '-regexp' requires non-empty pattern strings
—A regexp pattern fails to compile.who: invalid regular expression
—An unsupported option token is provided.who: unsupported option
—Filename argument is not a char row or string scalar.who: filename must be a character vector or string scalar
—A selector cell contains a non-string-like element.who: selection cells must contain string or character scalars
—Selector argument is not a char array/string/string array/cell thereof.who: selections must be character vectors, string scalars, string arrays, or cell arrays of those types
—Wildcard selector pattern fails to parse.who: invalid pattern
—The selected MAT-file cannot be read or decoded.who: MAT-file read failed
—The result cell cannot be constructed.who: failed to construct the name cell

Behavior

who with no arguments lists every variable in the current workspace, sorted alphabetically.

who pattern1 pattern2 ... accepts character vectors or string scalars with MATLAB wildcard syntax (*, ?, [abc]). Any variable name that matches at least one pattern is returned.

who('-regexp', expr1, expr2, ...) keeps names that match any of the supplied regular expressions.

who('global') lists only global variables in the active workspace.

who('-file', filename, ...) inspects the variables stored in a MAT-file. You can combine this option with explicit names or -regexp selectors.

RunMat returns a column cell array of string scalars, including an empty 0×1 cell when no names match. MATLAB character-vector elements remain a carrier-parity issue.

Residency and execution

Workspace values, including GPU handles, are enumerated by name without payload transfer. Selector arguments must be host text or cells of host text; numeric resident selectors are invalid and reject before provider readback.

No. who never requires you to gather data or move arrays between the host and GPU. It simply reports variable names, regardless of residency. Use gpuArray or gather only when you explicitly need to control where data lives.

who is a host query that never runs a GPU kernel. When a variable is a gpuArray, RunMat leaves it resident on the device and reports its name without triggering any device-to-host copies. Numeric resident selector arguments are invalid and reject before readback.

Legacy examples and displayed results

List All Workspace Variables

a = 42;

b = rand(3, 2);

names = who

Expected display: names =

2×1 cell array

{"a"}

{"b"}

Filter With Wildcard Patterns

alpha = 1;

beta = 2;

names = who("a*")

Expected display: names =

1×1 cell array

{"alpha"}

Use Regular Expressions

x1 = rand;

x2 = rand;

matches = who('-regexp', '^x\d$')

Expected display: matches =

2×1 cell array

{"x1"}

{"x2"}

Inspect Variables Stored In A MAT-File

save('snapshot.mat', 'alpha', 'beta')

file_names = who('-file', 'snapshot.mat')

Expected display: file_names =

2×1 cell array

{"alpha"}

{"beta"}

List Only Global Variables

global shared;

local = 1;

globals = who('global')

Expected display: globals =

1×1 cell array

{"shared"}

Examples

Filter workspace names

alpha = 1; beta = 2; names = who("a*")

Filter names with a regular expression

x1 = 1; x2 = 2; other = 3; matches = who('-regexp', '^x\d$')

Read variable names from a MAT-file

alpha = 1; beta = 2; save('workspace_names_snapshot.mat','alpha','beta'); file_names = who('-file','workspace_names_snapshot.mat')

Using who with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how who changes the result.

Run a small who example, explain the result, then change one input and compare the output.

FAQ

What type does who return?⌄

RunMat returns a column cell array of string scalars. MATLAB character-vector element parity remains open.

Are the names sorted?⌄

Yes. Results are sorted alphabetically so that diffs are deterministic.

Can I mix wildcard patterns and -regexp?⌄

Yes. The final result includes any name matched by either the wildcard selectors or the regular expressions.

What happens if no variables match?⌄

You receive a 0×1 cell array. You can call isempty on it to check for an empty result.

Can I call who('-file', ...) on large MAT-files?⌄

The current MAT reader decodes selected file content into temporary values without assigning to the workspace; this is not a metadata-only partial-file scan.

Related Introspection functions

addlistener · addParameter · addprop · assignin · builtin · cancel · class · clear · clearAllMemoizedCaches · clearCache · clearvars · dbclear · dbstack · dbstatus · dbtype · eval · evalc · evalin · feval · findprop · func2str · functions · get.p · getcallinfo · getmethod · inputname · inputParser · isa · ischar · isdeployed · iskeyword · ismethod · isobject · isstring · isUnderlyingType · isvalid · keyboard · loadobj · localfunctions · matlab.metadata.DynamicProperty.delete · memoize · metaclass · mfilename · mislocked · mlock · munlock · namelengthmax · narginchk · nargoutchk · new_object · notify · numArgumentsFromSubscript · onCleanup · parse · saveobj · set.p · stats · str2func · subsasgn · subsref · superclasses · underlyingType · verLessThan · version · which · whos

Source you can read

Every RunMat function's source is public. Read exactly how who is executed, line by line, in Rust.

  • View the source for who in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/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.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • Behavior
  • Residency and execution
  • Legacy examples and displayed results
  • Examples
  • Filter workspace names
  • Filter names with a regular expression
  • Read variable names from a MAT-file
  • Using who with coding agents
  • FAQ
  • Related Introspection functions
  • Source you can read
  • About RunMat