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
    • statget
    • statset

statget — Read values from statistics options structures.

statget(options,field) reads one field from a statistics options structure, using case-insensitive unique-prefix matching. Add defaultData to supply a value when the recognized field is empty. The default is an opaque value rather than a numeric conversion: any integer class, shape, and exact payload is returned unchanged when selected.

Syntax

val = statget(options, field)
val = statget(options, field, defaultData)

Inputs

NameTypeRequiredDefaultDescription
optionsAnyYes—Statistics options structure.
fieldStringScalarYes—Option field name or unique leading prefix.
defaultDataAnyNo—Value returned when the selected option is empty.

Returns

NameTypeDescription
valAnyOption field value.

Errors

IdentifierWhenMessage
RunMat:statget:InvalidArgumentArgument grammar does not match statget forms.statget: invalid argument
RunMat:statget:InvalidOptionThe options argument is not a struct or the field argument is not text.statget: invalid option

How statget works

  • options must be a struct, typically created by statset.
  • field is matched case-insensitively and can be a unique leading prefix of a known statistics option field.
  • If the requested field is recognized but empty, statget returns the supplied default value when present, otherwise it returns the empty value.
  • If the requested field is not recognized or is ambiguous, RunMat returns an empty numeric value for compatibility with loose MATLAB option probing.
  • defaultData accepts any data type. Integer defaults keep their class, shape, and exact values.

Examples

Read an explicit option

opts = statset('TolX', 1e-8);
tol = statget(opts, 'TolX')

Expected output:

`tol` is `1e-8`.

Use a default for an empty option

opts = statset('MaxIter', 100);
tol = statget(opts, 'TolFun', 1e-6)

Expected output:

`tol` is `1e-6` because `TolFun` is empty.

Use a unique prefix

opts = statset('MaxIter', 100);
iter = statget(opts, 'MaxI')

Expected output:

`iter` is `100`.

Using statget with coding agents

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

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

Related Stats functions

Options

statset

Ml

bayesopt · classify · confusionmat · crossvalind · cvpartition · fitclinear · fitctree · fitlm · kmeans · knnsearch · lasso · lassoglm · linkage · lscov · mnrfit · optimizableVariable · pdist · pdist2 · perfcurve · predict · regress · ridge · squareform · test · training · tsne

Summary

binocdf · boxplot · cdf · cdfplot · chi2cdf · corr · corrcoef · corrcov · cov · cov2corr · dummyvar · ecdf · filloutliers · fitdist · geomean · grpstats · harmmean · icdf · isoutlier · kstest · kurtosis · lsline · mad · mode · nanmax · normalize · normcdf · norminv · normpdf · onehotdecode · onehotencode · pdf · prctile · quantile · refline · rmse · skewness · tabulate · tcdf · tiedrank · tinv · tpdf · ttest2 · wblinv

Random

binornd · bootstrp · datasample · dividerand · exprnd · gamrnd · lhsdesign · mvnrnd · normrnd · random · randsample · rng · trnd · unidrnd · unifrnd · wblrnd

Hist

histc · histcounts · histcounts2

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how statget is executed, line by line, in Rust.

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

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
  • Returns
  • Errors
  • How statget works
  • Examples
  • Read an explicit option
  • Use a default for an empty option
  • Use a unique prefix
  • Using statget with coding agents
  • Related Stats functions
  • Options
  • Ml
  • Summary
  • Random
  • Hist
  • Open-source implementation
  • About RunMat