RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

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.

LicensePrivacy
/
See all docs
Builtin Reference
    • isvarname
    • mustBeA
    • mustBeColumn
    • mustBeFile
    • mustBeFinite
    • mustBeFloat
    • mustBeFolder
    • mustBeGreaterThan
    • mustBeGreaterThanOrEqual
    • mustBeInRange
    • mustBeInteger
    • mustBeLessThan
    • mustBeLessThanOrEqual
    • mustBeMember
    • mustBeNegative
    • mustBeNonempty
    • mustBeNonmissing
    • mustBeNonNan
    • mustBeNonnegative
    • mustBeNonpositive
    • mustBeNonsparse
    • mustBeNonzero
    • mustBeNonzeroLengthText
    • mustBeNumeric
    • mustBeNumericOrLogical
    • mustBePositive
    • mustBeReal
    • mustBeScalarOrEmpty
    • mustBeSparse
    • mustBeText
    • mustBeTextScalar
    • mustBeUnderlyingType
    • mustBeValidVariableName
    • mustBeVector
    • namedargs2cell
    • validateFunctionSignaturesJSON

mustBeNonzeroLengthText — Validate that text values are nonempty.

mustBeNonzeroLengthText is available as a callable MATLAB argument validator. It returns no user-facing value when validation passes and throws a structured RunMat error when validation fails. Validators with literal/static payloads are also encoded in MATLAB arguments blocks; dynamic validator payload expressions should call the validator directly until runtime-evaluated arguments-block payloads are implemented. Integer inputs are validated or rejected from their exact class and values. Resident metadata is validated before any provider access, automatic residency remains transparent, and unsupported explicit gpuArray forms are compatibility-gated before download.

Syntax

mustBe*(A, ...)

Inputs

NameTypeRequiredDefaultDescription
AAnyYes—Value to validate.
BAnyVariadic—Additional validator-specific argument.

Errors

IdentifierWhenMessage
RunMat:validators:ValidationFailedA value does not satisfy the requested validator.argument validation failed
RunMat:validators:InvalidArgumentA validator receives an unsupported argument count or argument type.invalid argument validation input
RunMat:validators:ProviderOwnershipMismatchA resident value has no exact owning provider.argument validation: no acceleration provider owns the input
RunMat:validators:ProviderPayloadMismatchA resident value carries contradictory physical class metadata.argument validation: resident input has contradictory physical class metadata

How mustBeNonzeroLengthText works

  • Callable validator forms enforce exact supported arity, throw on validation failure, and suppress automatic output on success.
  • Arguments-block validation uses the same shared runtime predicates for validators that RunMat can encode statically.
  • Numeric validators check every element without materializing a cloned numeric array, including sparse stored values and implicit sparse zeros where relevant.
  • Text validators accept string scalars/arrays, character row vectors, and compatible cell arrays of text where MATLAB commonly permits them.
  • All eight integer classes are classified from authoritative storage; exact ordering, range, membership, sign, zero, finiteness, and missingness checks never reconstruct wide values from binary64.
  • Resident validation verifies owner, physical storage, precision, logical/integer class, and wrapper provenance before using metadata or downloading exact content.
  • Automatic residency remains transparent; explicit gpuArray input is accepted only for documented forms or a declared RunMat-only extension.

Does RunMat run mustBeNonzeroLengthText on the GPU?

Validation does not use the generic message-based gather retry path. Integrity and compatibility failures are terminal; admitted content checks download typed storage deliberately through the exact owning provider.

GPU memory and residency

Metadata-decidable validators avoid download. Content-dependent validators use a non-destructive exact-owner download and leave the source handle, class, payload, and provenance unchanged.

Example

Using the validator as a normal callable guard

mustBeNonzeroLengthText(A)

Expected output:

No output when validation passes; an error is thrown when validation fails.

Using mustBeNonzeroLengthText with coding agents

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

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

FAQ

Does this validator work in an arguments block?⌄

Yes for literal/static validator payloads that RunMat can encode at compile time. Dynamic validator payload expressions should use the callable form for now.

Related Argument Validation functions

isvarname · mustBeA · mustBeColumn · mustBeFile · mustBeFinite · mustBeFloat · mustBeFolder · mustBeGreaterThan · mustBeGreaterThanOrEqual · mustBeInRange · mustBeInteger · mustBeLessThan · mustBeLessThanOrEqual · mustBeMember · mustBeNegative · mustBeNonempty · mustBeNonmissing · mustBeNonNan · mustBeNonnegative · mustBeNonpositive · mustBeNonsparse · mustBeNonzero · mustBeNumeric · mustBeNumericOrLogical · mustBePositive · mustBeReal · mustBeScalarOrEmpty · mustBeSparse · mustBeText · mustBeTextScalar · mustBeUnderlyingType · mustBeValidVariableName · mustBeVector · namedargs2cell · validateFunctionSignaturesJSON

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.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Errors
  • How mustBeNonzeroLengthText works
  • Does RunMat run mustBeNonzeroLengthText on the GPU?
  • GPU memory and residency
  • Example
  • Using the validator as a normal callable guard
  • Using mustBeNonzeroLengthText with coding agents
  • FAQ
  • Related Argument Validation functions
  • About RunMat