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

addprop — Add a per-instance dynamic property to a handle object.

prop = addprop(obj, name) adds a dynamic property to a valid dynamicprops handle object and returns a matlab.metadata.DynamicProperty metadata handle for that per-instance property.

Syntax

prop = addprop(object, property_name)

Inputs

NameTypeRequiredDefaultDescription
objectAnyYes—Scalar handle object that receives a per-instance dynamic property.
property_namePropertyNameYes—Name of the dynamic property to add.

Returns

NameTypeDescription
propAnyDynamic property metadata handle.

Errors

IdentifierWhenMessage
RunMat:dynamicprops:InvalidTargetThe target is not a valid handle object.dynamicprops: target must be a valid handle object
RunMat:dynamicprops:InvalidNameThe property name is empty or not a valid identifier.dynamicprops: invalid property name
RunMat:dynamicprops:DuplicatePropertyA class-defined or dynamic property already exists with the requested name.dynamicprops: property already exists
RunMat:dynamicprops:InvalidMetadataA dynamic property metadata handle is invalid or malformed.dynamicprops: invalid dynamic property metadata
RunMat:dynamicprops:UnsupportedMetadataPropertyA metadata property assignment uses an unsupported property name or value.dynamicprops: unsupported dynamic property metadata assignment

How addprop works

  • The target must be a valid handle object whose class inherits from dynamicprops; value objects, ordinary handle classes, and structs are rejected.
  • The property name must be a valid identifier and must not duplicate a class-defined property or an existing dynamic property on the same instance.
  • addprop does not accept an initial value. Numeric or integer data assigned later belongs to the dynamic property and follows ordinary object-property assignment semantics; it is not an addprop input or output.
  • The new property is immediately readable and writable through dot syntax, getfield, and setfield.
  • The returned metadata handle exposes Name, DefiningClass, GetAccess, SetAccess, Dependent, Hidden, Transient, NonCopyable, AbortSet, SetObservable, GetObservable, and Description fields.
  • Writable metadata fields update the target object's dynamic property metadata. Name and DefiningClass are read-only.
  • delete(prop) removes the dynamic property and invalidates the metadata handle.

GPU memory and residency

addprop mutates host-side object metadata. GPU-resident numeric values assigned into dynamic properties follow the same residency behavior as ordinary object properties.

Examples

Add and use a dynamic property

classdef Sensor < dynamicprops
end
s = new_object('Sensor');
p = addprop(s, 'gain');
s.gain = 7;
value = s.gain

Expected output:

value = 7

Set metadata

p = addprop(s, 'label');
p.Hidden = true;
tf = p.Hidden

Expected output:

tf = logical(1)

Using addprop with coding agents

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

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

FAQ

Does addprop work on value classes?⌄

No. MATLAB dynamic properties are handle-object instance state, so RunMat requires a valid handle object.

Are dynamic properties saved to MAT files?⌄

Not as full classdef metadata. RunMat saves object property values through the existing object serialization path, but complete dynamic-property persistence requires broader classdef persistence support.

Do SetObservable and GetObservable fire property listeners?⌄

The metadata flags are stored and reported, but full observable-property listener semantics are not implemented yet.

Related Introspection functions

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

Open-source implementation

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

  • View the source for addprop 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 addprop works
  • GPU memory and residency
  • Examples
  • Add and use a dynamic property
  • Set metadata
  • Using addprop with coding agents
  • FAQ
  • Related Introspection functions
  • Open-source implementation
  • About RunMat