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.2, Nov 26, 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
    • colon
    • createArray
    • empty
    • eye
    • false
    • full
    • inf
    • int16.empty
    • int32.empty
    • int64.empty
    • int8.empty
    • linspace
    • logspace
    • magic
    • meshgrid
    • nan
    • ndgrid
    • nonzeros
    • ones
    • peaks
    • rand
    • randi
    • randn
    • randperm
    • range
    • sparse
    • spdiags
    • speye
    • spones
    • sprand
    • true
    • uint16.empty
    • uint32.empty
    • uint64.empty
    • uint8.empty
    • zeros

false — Create logical arrays filled with false values.

false creates logical arrays filled with false values. MATLAB-compatible mode accepts scalar dimensions, multiple scalar dimensions, a row size vector, and 'like'. Integer dimensions are read exactly, negative dimensions become zero, and trailing singleton dimensions are normalized according to MATLAB array-shape rules.

Syntax

L = false()
L = false(n)
L = false(size_vector)
L = false(m, n, ...)
L = false(prototype)
L = false(..., "logical")
L = false(..., "like", prototype)

Inputs

n
Type
SizeArg
Required
Yes
Description
Square size.
size_vector
Type
SizeArg
Required
Yes
Description
Size vector defining output dimensions.
dims
Type
SizeArg
Required
Variadic
Description
Dimension sizes.
prototype
Type
LikePrototype
Required
Yes
Description
Prototype value when no numeric dimension arguments are provided.
typename
Type
StringScalar
Required
No
Default
"logical"
Description
Class override keyword (logical).
like_kw
Type
StringScalar
Required
Yes
Default
"like"
Description
Like keyword.
prototype
Type
LikePrototype
Required
Yes
Description
Prototype array used for class/device.
NameTypeRequiredDefaultDescription
nSizeArgYes—Square size.
size_vectorSizeArgYes—Size vector defining output dimensions.
dimsSizeArgVariadic—Dimension sizes.
prototypeLikePrototypeYes—Prototype value when no numeric dimension arguments are provided.
typenameStringScalarNo"logical"Class override keyword (logical).
like_kwStringScalarYes"like"Like keyword.
prototypeLikePrototypeYes—Prototype array used for class/device.

Returns

L
Type
LogicalArray
Description
Logical output array.
NameTypeDescription
LLogicalArrayLogical output array.

Errors

RunMat:false:TooManyOutputs
When
More than one output is requested.
Message
false: too many output arguments
—
When
The 'like' keyword is provided without a prototype argument.
Message
false: expected prototype after 'like'
—
When
The 'like' keyword is provided multiple times.
Message
false: multiple 'like' specifications are not supported
IdentifierWhenMessage
RunMat:false:TooManyOutputsMore than one output is requested.false: too many output arguments
—The 'like' keyword is provided without a prototype argument.false: expected prototype after 'like'
—The 'like' keyword is provided multiple times.false: multiple 'like' specifications are not supported
—A trailing option string is not supported.false: unrecognised option
—A numeric dimension is fractional or nonfinite; negative dimensions instead clamp to zero.false: dimensions must be finite integer values

Behavior

false() returns the scalar logical false.

false(n) returns an n x n logical array of false values.

false(m, n, ...) returns a logical array with the requested dimensions.

false(sz) accepts one row size vector. A column vector or multiple vector size inputs are rejected.

All eight integer classes are exact size controls. Negative signed dimensions become zero; noninteger, nonfinite, or platform-unrepresentable dimensions reject before allocation.

false(___, 'like', prototype) preserves applicable sparsity or owning-provider residency while the result remains logical. The prototype never supplies output shape, so false('like', prototype) is 1 × 1.

false(A), the 'logical' class option, single-precision size controls, and resident size controls are independently gated RunMat extensions rather than MATLAB-compatible syntax. An admitted resident size control is gathered structurally and still produces host logical output unless residency is requested explicitly with 'like'.

GPU residency and provider behavior

A resident 'like' prototype creates a logical result on that handle's owning provider. Numeric size arguments remain structural controls and do not independently request GPU output.

Examples

Creating a 2x3 logical array of false values

mask = false(2, 3)

Expected output:

mask = [0 0 0; 0 0 0]

Creating a logical array from a size vector

dims = [1 4 2];
mask = false(dims)

Expected output:

mask =
  1x4x2 logical array
     0     0     0     0
     0     0     0     0

Creating a false mask with the same size and residency as an existing array

A = rand(2, 2);
mask = false(size(A), 'like', A)

Expected output:

mask =
  2x2 logical array
     0     0
     0     0

Using false with coding agents

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

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

FAQ

What does false() return?⌄

It returns the logical scalar false.

Does false(n) create a square array?⌄

Yes. false(n) returns an n x n logical array of false values, matching MATLAB behavior.

How does false(sz) interpret a size vector?⌄

A row vector is treated as the full set of dimensions, so false([2 3 4]) yields a 2x3x4 logical array. Column vectors and multiple vector inputs are rejected.

Does false keep results on the GPU?⌄

Yes, when residency is requested explicitly with 'like'. RunMat constructs the logical result through the prototype handle's owning provider; a GPU value supplied as an ordinary size control does not implicitly determine shape and residency at once.

Is the 'logical' option required?⌄

No. false always returns logical values. RunMat retains the redundant 'logical' spelling only in extension mode.

Related Array functions

Creation

colon · createArray · empty · eye · full · inf · int16.empty · int32.empty · int64.empty · int8.empty · linspace · logspace · magic · meshgrid · nan · ndgrid · nonzeros · ones · peaks · rand · randi · randn · randperm · range · sparse · spdiags · speye · spones · sprand · true · uint16.empty · uint32.empty · uint64.empty · uint8.empty · zeros

Accumulation

accumarray

Sorting Sets

argsort · intersect · ismember · ismembertol · issorted · issortedrows · setdiff · setxor · sort · sortrows · union · unique

Shape

blkdiag · cat · circshift · diag · flip · fliplr · flipud · horzcat · ipermute · kron · permute · repelem · repmat · reshape · rot90 · shiftdim · squeeze · toeplitz · tril · triu · vertcat

Combinatorics

combinations · nchoosek · perms

Binning

discretize

Indexing

find · ind2sub · sub2ind

Grouping

findgroups · groupcounts · grp2idx · splitapply

Introspection

height · iscolumn · isempty · ismatrix · isrow · isscalar · isvector · length · ndims · numel · size · width

Source you can read

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

  • View the source for false 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
  • GPU residency and provider behavior
  • Examples
  • Creating a 2x3 logical array of false values
  • Creating a logical array from a size vector
  • Creating a false mask with the same size and residency as an existing array
  • Using false with coding agents
  • FAQ
  • Related Array functions
  • Creation
  • Accumulation
  • Sorting Sets
  • Shape
  • Combinatorics
  • Binning
  • Indexing
  • Grouping
  • Introspection
  • Source you can read
  • About RunMat