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.1, Nov 17, 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
    • addlistener
    • addParameter
    • addprop
    • assignin
    • builtin
    • cancel
    • class
    • clear
    • clearAllMemoizedCaches
    • clearCache
    • clearvars
    • dbclear
    • dbstack
    • dbstatus
    • dbtype
    • eval
    • evalc
    • evalin
    • feval
    • findprop
    • func2str
    • functions
    • get.p
    • getcallinfo
    • getmethod
    • inputname
    • inputParser
    • isa
    • ischar
    • isdeployed
    • iskeyword
    • ismethod
    • isobject
    • isstring
    • isUnderlyingType
    • isvalid
    • keyboard
    • loadobj
    • localfunctions
    • matlab.metadata.DynamicProperty.delete
    • memoize
    • metaclass
    • mfilename
    • mislocked
    • mlock
    • munlock
    • namelengthmax
    • narginchk
    • nargoutchk
    • new_object
    • notify
    • numArgumentsFromSubscript
    • onCleanup
    • parse
    • saveobj
    • set.p
    • stats
    • str2func
    • subsasgn
    • subsref
    • superclasses
    • underlyingType
    • verLessThan
    • version
    • which
    • who
    • whos

new_object — Create a class instance initialized from registered property defaults.

new_object(class_name) is a RunMat object-construction entry. It creates a scalar object from the selected class registry, including inherited nonstatic default properties, but does not call a user constructor method. A class with handle ancestry returns a handle instance; an unknown valid class name produces an empty value object.

Syntax

obj = new_object(class_name)

Inputs

class_name
Type
StringScalar
Required
Yes
Default
—
Description
Class name for the object to create.
NameTypeRequiredDefaultDescription
class_nameStringScalarYes—Class name for the object to create.

Returns

obj
Type
Any
Description
Created class object value.
NameTypeDescription
objAnyCreated class object value.

Errors

RunMat:NEW_OBJECT:Arity
When
The number of inputs does not match the fixed signature.
Message
new_object: expected 1 input arguments
RunMat:TooManyOutputs
When
More than one output is requested.
Message
new_object: at most one output is supported
IdentifierWhenMessage
RunMat:NEW_OBJECT:ArityThe number of inputs does not match the fixed signature.new_object: expected 1 input arguments
RunMat:TooManyOutputsMore than one output is requested.new_object: at most one output is supported

Inputs and outputs

class_name accepts scalar string text or a character row. The existing runtime also formats scalar integers using exact decimal text, and scalar doubles and logicals using their legacy textual form. This formatting does not imply that the resulting text is a valid class identity. Numeric arrays and provider-resident values are not gathered.

Zero or one output is supported; the output class follows class_name. The property set and handle/value semantics depend on the selected runtime registry and cannot be inferred from the name alone.

Construction and errors

Registered class defaults are traversed root-to-leaf; static properties are omitted. Default values retain their existing shared roots. Unknown valid class identities are permitted and have no declared properties.

This helper initializes defaults only. It does not invoke class_name(args), evaluate arbitrary source, or establish a workspace variable by itself. Abstract classes reject with RunMat:AbstractMethodMissing. Malformed class names reject with RunMat:InvalidClassName; retained selected-owner mismatches and allocation failures preserve their existing diagnostics.

Execution and resource limits

The canonical binding retains its full BuiltinArguments owner and scopes the selected RuntimeContext around the existing class service. Registry reads and GC/default backing remain conservatively modeled as runtime-owned impure effects.

Cancellation and stale allocation authority are checked before text projection, scope allocation, or object construction. Finite managed construction is refused with RunMat:Placement:InsufficientResourceEvidence until registry/default/handle backing has an exact physical bound. This is not a bounded-host success claim.

Construction is host-only on native and WASM, a fusion boundary, and unsupported for distributed placement. There is no GPU provider or implicit gather.

Examples

Construct an empty instance for an unregistered class

obj = new_object('ExampleEmpty');
name = class(obj);

Reject a malformed class identity

obj = new_object('bad..Class');

Using new_object with coding agents

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

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

FAQ

Does new_object call my constructor method?⌄

No. It initializes registered nonstatic property defaults; ordinary class construction is the route for invoking a user constructor.

Is this the MATLAB constructor API?⌄

No. This is a RunMat-native construction helper, not a claim of MATLAB new_object compatibility.

Related Introspection functions

addlistener · addParameter · addprop · assignin · builtin · cancel · class · clear · clearAllMemoizedCaches · clearCache · clearvars · dbclear · dbstack · dbstatus · dbtype · eval · evalc · evalin · feval · findprop · func2str · functions · get.p · getcallinfo · getmethod · inputname · inputParser · isa · ischar · isdeployed · iskeyword · ismethod · isobject · isstring · isUnderlyingType · isvalid · keyboard · loadobj · localfunctions · matlab.metadata.DynamicProperty.delete · memoize · metaclass · mfilename · mislocked · mlock · munlock · namelengthmax · narginchk · nargoutchk · notify · numArgumentsFromSubscript · onCleanup · parse · saveobj · set.p · stats · str2func · subsasgn · subsref · superclasses · underlyingType · verLessThan · version · which · who · whos

Source you can read

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

  • View the source for new_object 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
  • Inputs and outputs
  • Construction and errors
  • Execution and resource limits
  • Examples
  • Construct an empty instance for an unregistered class
  • Reject a malformed class identity
  • Using new_object with coding agents
  • FAQ
  • Related Introspection functions
  • Source you can read
  • About RunMat