MATLAB 帮助中心
类属性名称
properties(ClassName)
properties(obj)
p = properties(___)
properties(ClassName) 显示 MATLAB® 类的具有公共 GetAccess 的非隐藏属性的名称,包括继承的属性。
ClassName
GetAccess
示例
properties(obj) 显示对象或对象数组的具有公共 GetAccess 的非隐藏属性的名称。如果 obj 为标量,则 properties 也返回动态属性。如果 obj 为数组,则 properties 返回数组的类的属性。
obj
properties
p = properties(___) 在字符向量元胞数组中返回属性名称。
p
全部折叠
使用类名列出类的属性。
properties memmapfile
Properties for class memmapfile: Filename Writable Offset Format Repeat Data
列出 MException 对象的公共属性。
me = MException('Msg:ID','MsgText'); p = properties(me)
p = 5×1 cell {'identifier'} {'message' } {'cause' } {'stack' } {'Correction'}
要查询其属性的类的名称,指定为字符向量或字符串标量。
要查询其属性的类的对象,指定为对象或对象数组。
属性名称,以字符向量元胞数组形式返回。
properties 一词还是一个 MATLAB 类定义关键字。有关类定义关键字的详细信息,请参阅 classdef。
classdef
全部展开
用法说明和限制:
仅当 obj 是 .m 文件中定义的 MATLAB 类实例时,代码生成才支持 properties(obj) 函数调用。
.m
为函数 properties 生成的代码返回对象属性的顺序可能与 MATLAB 的执行顺序不同。
backgroundPool
ThreadPool
此函数完全支持基于线程的环境。有关详细信息,请参阅在基于线程的环境中运行 MATLAB 函数。
此函数完全支持分布式数组。有关详细信息,请参阅使用分布式数组运行 MATLAB 函数 (Parallel Computing Toolbox)。
在 R2008a 中推出
fieldnames | events | methods
fieldnames
events
methods
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处