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
    • addprop
    • assignin
    • class
    • clear
    • clearAllMemoizedCaches
    • clearCache
    • clearvars
    • dbclear
    • dbstack
    • dbstatus
    • dbtype
    • evalc
    • feval
    • findprop
    • getcallinfo
    • inputParser
    • isa
    • ischar
    • isdeployed
    • iskeyword
    • ismethod
    • isobject
    • isstring
    • isUnderlyingType
    • keyboard
    • matlab.metadata.DynamicProperty.delete
    • memoize
    • metaclass
    • mislocked
    • mlock
    • munlock
    • namelengthmax
    • narginchk
    • nargoutchk
    • notify
    • onCleanup
    • stats
    • str2func
    • superclasses
    • underlyingType
    • verLessThan
    • version
    • which
    • who
    • whos

inputParser — Parse MATLAB-style optional name-value arguments.

inputParser creates a handle object for parsing common MATLAB name-value argument patterns. RunMat supports the minimal workflow used by imported helper functions: create a parser, register parameters with defaults, parse varargin{:}, and read values from p.Results.

Syntax

function y = f(varargin)

How inputParser works

  • p = inputParser returns a handle object with an initially empty Results struct.
  • addParameter(p, name, default) registers a case-sensitive name and default value, mutating p in place.
  • parse(p, name, value, ...) starts from the registered defaults and applies exact name matches.
  • p.Results.<name> reads the parsed value for a registered parameter.
  • Duplicate parameter names, odd name-value argument counts, non-text names, and unknown parsed names raise stable RunMat errors.
  • This compatibility slice does not yet implement addRequired, addOptional, validators, CaseSensitive, PartialMatching, KeepUnmatched, or StructExpand.

Examples

Parse an optional scale parameter

function y = f(varargin)
  p = inputParser;
  addParameter(p, 'scale', 2);
  parse(p, varargin{:});
  y = p.Results.scale;
end

f('scale', 4)

Expected output:

ans =
     4

Use a registered default when the name is omitted

p = inputParser;
addParameter(p, 'scale', 2);
parse(p);
p.Results.scale

Expected output:

ans =
     2

Using inputParser with coding agents

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

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

FAQ

Are parameter names case-sensitive?⌄

Yes. This initial RunMat implementation uses exact case-sensitive name matching.

Does RunMat support validators or positional arguments?⌄

Not yet. The current support is intentionally limited to optional name-value parameters registered with addParameter.

Related Introspection functions

addprop · assignin · class · clear · clearAllMemoizedCaches · clearCache · clearvars · dbclear · dbstack · dbstatus · dbtype · evalc · feval · findprop · getcallinfo · isa · ischar · isdeployed · iskeyword · ismethod · isobject · isstring · isUnderlyingType · keyboard · matlab.metadata.DynamicProperty.delete · memoize · metaclass · mislocked · mlock · munlock · namelengthmax · narginchk · nargoutchk · notify · onCleanup · stats · str2func · superclasses · underlyingType · verLessThan · version · which · who · whos

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
  • How inputParser works
  • Examples
  • Parse an optional scale parameter
  • Use a registered default when the name is omitted
  • Using inputParser with coding agents
  • FAQ
  • Related Introspection functions
  • About RunMat