findprop — Find property metadata on an object or handle object.

prop = findprop(obj, name) returns property metadata for class-defined or dynamic properties. Dynamic properties on handle objects return a matlab.metadata.DynamicProperty handle; class-defined properties return a matlab.metadata.Property object. Missing properties return an empty double.

Syntax

prop = findprop(object, property_name)

Inputs

NameTypeRequiredDefaultDescription
objectAnyYesObject or handle object to inspect.
property_namePropertyNameYesProperty name to locate.

Returns

NameTypeDescription
propAnyProperty metadata object, or an empty double when no property exists.

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

How findprop works

  • The target must be an object or valid handle object.
  • Dynamic property lookup on handle objects returns a metadata handle that can later be passed to delete.
  • Class-defined property lookup returns metadata fields including Name, DefiningClass, GetAccess, SetAccess, and Dependent.
  • Missing properties return [].
  • Invalid handle targets raise RunMat:dynamicprops:InvalidTarget.

GPU memory and residency

findprop inspects host-side metadata and returns host metadata values.

Examples

Find a dynamic property

p = addprop(s, 'gain');
q = findprop(s, 'gain');
name = q.Name

Expected output:

name = 'gain'

Missing property

q = findprop(s, 'missing')

Expected output:

q = []

Using findprop with coding agents

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

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

FAQ

Can metadata returned by findprop for class-defined properties be deleted?

No. Only dynamic property metadata handles returned for per-instance properties can be deleted.

Does findprop invoke user methods?

No. It inspects runtime class and object metadata only.

Open-source implementation

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

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.