findprop
类: handle
查找 meta.property
对象
语法
mp = findprop(h,property)
说明
返回与对象 mp
= findprop(h
,property
)h
的给定属性关联的 meta.property
对象。property
可以是 h
的类定义的属性,也可以是仅为对象 h
定义的动态属性。
输入参数
h
— 句柄对象
句柄
句柄对象,指定为标量句柄。
property
— 属性的名称
字符向量 | 字符串标量
属性名称,指定为区分大小写的带引号文本。
数据类型: char
| string
输出参数
mp
— meta.property
对象
meta.property
| meta.DynamicProperty
与给定属性关联的 meta.property
对象。如果 findprop
在对象 h
上找不到该属性,则 findprop
返回一个 0×1 的空 meta.property
对象。如果该属性是动态属性,则此函数返回 meta.DynamicProperty
对象
示例
显示属性特性
显示 containers.Map Count 属性的当前特性值。
mp = findprop(containers.Map,'Count');
disp(mp)
property with properties: Name: 'Count' Description: 'Number of pairs in the collection' DetailedDescription: '' GetAccess: 'public' SetAccess: 'private' Dependent: 1 Constant: 0 Abstract: 0 Transient: 1 Hidden: 0 GetObservable: 0 SetObservable: 0 AbortSet: 0 NonCopyable: 1 PartialMatchPriority: 1 GetMethod: [] SetMethod: [] HasDefault: 0 Validation: [0x0 meta.Validation] DefiningClass: [1x1 meta.class]
扩展功能
基于线程的环境
使用 MATLAB® backgroundPool
在后台运行代码或使用 Parallel Computing Toolbox™ ThreadPool
加快代码运行速度。
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)