rmprop
说明
T = rmprop(
从表或时间表 T
,propertyNames
)T
中删除包含自定义元数据的属性。输入参数 propertyNames
指定属性的名称。
示例
删除自定义属性
将包含自定义元数据的属性添加到表中。然后删除一些属性。
首先,将湿度和空气质量的测量值读入表中。显示前三行。
T = readtable('indoors.csv');
head(T,3)
Time Humidity AirQuality ___________________ ________ __________ 2015-11-15 00:00:24 36 80 2015-11-15 01:13:35 36 80 2015-11-15 02:26:47 37 79
使用 addprop
函数为自定义元数据添加属性。然后为这些属性指定元数据。
T = addprop(T,{'Instrument','Precision','SourceFile'},{'variable','variable','table'}); T.Properties.CustomProperties.Instrument = ["clock" "hygrometer" "air quality meter"]; T.Properties.CustomProperties.Precision = [NaN 0.5 0.1]; T.Properties
ans = TableProperties with properties: Description: '' UserData: [] DimensionNames: {'Row' 'Variables'} VariableNames: {'Time' 'Humidity' 'AirQuality'} VariableDescriptions: {} VariableUnits: {} VariableContinuity: [] RowNames: {} Custom Properties (access using t.Properties.CustomProperties.<name>): SourceFile: [] Instrument: ["clock" "hygrometer" "air quality meter"] Precision: [NaN 0.5000 0.1000]
要删除属性,请使用 rmprop
函数。您只能删除您之前使用 addprop
添加的自定义属性。您不能删除 T.Properties
中的其他属性,但可以删除它们包含的值。
从 T.Properties.CustomProperties
中删除 Instrument
和 SourceFile
属性。
T = rmprop(T,{'Instrument','SourceFile'}); T.Properties
ans = TableProperties with properties: Description: '' UserData: [] DimensionNames: {'Row' 'Variables'} VariableNames: {'Time' 'Humidity' 'AirQuality'} VariableDescriptions: {} VariableUnits: {} VariableContinuity: [] RowNames: {} Custom Properties (access using t.Properties.CustomProperties.<name>): Precision: [NaN 0.5000 0.1000]
输入参数
扩展功能
tall 数组
对行数太多而无法放入内存的数组进行计算。
版本历史记录
在 R2018b 中推出
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)