properties - Class property names - MATLAB (original) (raw)

Main Content

Syntax

Description

properties([ClassName](#d126e1420859)) displays the names of non-hidden properties with public GetAccess for the MATLAB® class, including inherited properties.

example

properties([obj](#d126e1420878)) displays the names of non-hidden properties with public GetAccess for the object or object array. When obj is scalar, properties also returns dynamic properties. When obj is an array,properties returns the properties of the class of the array.

example

[p](#d126e1420902) = properties(___) returns the property names in a cell array of character vectors.

example

Examples

collapse all

List the properties of a class using the class name.

Properties for class memmapfile:

Filename
Writable
Offset
Format
Repeat
Data

List the public properties of an MException object.

me = MException('Msg:ID','MsgText'); p = properties(me)

p = 5×1 cell {'identifier'} {'message' } {'cause' } {'stack' } {'Correction'}

Input Arguments

collapse all

Name of the class whose properties you want to query, specified as a character vector or string scalar.

Object of the class whose properties you want to query, specified as an object or array of objects.

Output Arguments

collapse all

Property names returned as a cell array of character vector.

More About

collapse all

The word properties is also a MATLAB class-definition keyword. See classdef for more information on class definition keywords.

Extended Capabilities

expand all

Usage notes and limitations:

Version History

Introduced in R2008a