mdfChannelInfo
说明
返回有关指定 MDF 文件中所有通道的信息表。infoTable
= mdfChannelInfo(mdfFileName
)
允许指定的名称-值参量在特定通道和通道组上进行过滤,并确定返回的元数据量。infoTable
= mdfChannelInfo(___,Name=Value
)
示例
从 MDF 文件获取通道信息
访问 MDF 文件中的通道信息。
获取关于所有通道的信息。
ci = mdfChannelInfo("VehicleData.mf4")
ci = 12×13 table Name GroupNumber GroupNumSamples GroupAcquisitionName GroupComment GroupSourceName GroupSourcePath DisplayName Unit Comment ExtendedNamePrefix SourceName SourcePath _________________ ___________ _______________ ____________________ ___________________________________________________________________________ _______________ _______________ ___________ ___________ ___________ __________________ ___________ ___________ "AirFlow" 2 92033 <undefined> Simulation of engine gas dynamics. <undefined> <undefined> "" g/s <undefined> <undefined> <undefined> <undefined> "Brake" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" ft*lbf <undefined> <undefined> <undefined> <undefined> "EngineRPM" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" rpm <undefined> <undefined> <undefined> <undefined> "FuelRate" 2 92033 <undefined> Simulation of engine gas dynamics. <undefined> <undefined> "" g/s <undefined> <undefined> <undefined> <undefined> "Gear" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" <undefined> <undefined> <undefined> <undefined> <undefined> "ImpellerTorque" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" ft*lbf <undefined> <undefined> <undefined> <undefined> "OutputTorque" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" ft*lbf <undefined> <undefined> <undefined> <undefined> "Throttle" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" % <undefined> <undefined> <undefined> <undefined> "TransmissionRPM" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" rpm <undefined> <undefined> <undefined> <undefined> "VehicleSpeed" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" mph <undefined> <undefined> <undefined> <undefined> "time" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" s <undefined> <undefined> <undefined> <undefined> "time" 2 92033 <undefined> Simulation of engine gas dynamics. <undefined> <undefined> "" s <undefined> <undefined> <undefined> <undefined>
查看特定通道的信息。
ci = mdfChannelInfo("VehicleData.mf4",Channel="*Torque")
ci = 2×13 table Name GroupNumber GroupNumSamples GroupAcquisitionName GroupComment GroupSourceName GroupSourcePath DisplayName Unit Comment ExtendedNamePrefix SourceName SourcePath ________________ ___________ _______________ ____________________ ___________________________________________________________________________ _______________ _______________ ___________ ______ ___________ __________________ ___________ ___________ "ImpellerTorque" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" ft*lbf <undefined> <undefined> <undefined> <undefined> "OutputTorque" 1 751 <undefined> Simulation of an automatic transmission controller during passing maneuver. <undefined> <undefined> "" ft*lbf <undefined> <undefined> <undefined> <undefined>
查看一个通道组中的通道信息。
ci = mdfChannelInfo("VehicleData.mf4",GroupNumber=2)
ci = 3×13 table Name GroupNumber GroupNumSamples GroupAcquisitionName GroupComment GroupSourceName GroupSourcePath DisplayName Unit Comment ExtendedNamePrefix SourceName SourcePath __________ ___________ _______________ ____________________ __________________________________ _______________ _______________ ___________ ____ ___________ __________________ ___________ ___________ "AirFlow" 2 92033 <undefined> Simulation of engine gas dynamics. <undefined> <undefined> "" g/s <undefined> <undefined> <undefined> <undefined> "FuelRate" 2 92033 <undefined> Simulation of engine gas dynamics. <undefined> <undefined> "" g/s <undefined> <undefined> <undefined> <undefined> "time" 2 92033 <undefined> Simulation of engine gas dynamics. <undefined> <undefined> "" s <undefined> <undefined> <undefined> <undefined>
请求多个通道匹配项的其他元数据。仅查看第一列和其他表列。
ci = mdfChannelInfo("VehicleData.mf4",Channel=["*Torque","*Rate"],AdditionalMetadata=true); ci(:,[1,14:25])
ans = 3×13 table Name Type SyncType DataType NumBits ComponentType CompositionType ConversionType SourceComment SourceType SourceBusType SourceBusChannelNumber SourceSimulated ________________ ___________ ________ ________________ _______ _____________ _______________ ______________ _____________ ___________ _____________ ______________________ _______________ "FuelRate" FixedLength None RealLittleEndian 64 None None Unspecified "" Unspecified Unspecified 0 false "ImpellerTorque" FixedLength None RealLittleEndian 64 None None Unspecified "" Unspecified Unspecified 0 false "OutputTorque" FixedLength None RealLittleEndian 64 None None Unspecified "" Unspecified Unspecified 0 false
输入参数
mdfFileName
— MDF 文件名
字符串 | 字符向量
MDF 文件名(包括必要的完整或相对路径),指定为字符串或字符向量。您可以使用 URL 来指定远程服务器上的文件。
根据您要访问的位置,mdfFileName
可以采用以下形式之一。
位置 | 形式 | ||||||||
---|---|---|---|---|---|---|---|---|---|
当前文件夹或 MATLAB® 路径 | 要访问当前文件夹或 MATLAB 路径中的文件,请在 示例: | ||||||||
其他文件夹 | 要访问当前文件夹以外的文件夹中的文件,请在 示例: 示例: | ||||||||
远程位置 | 要访问远程位置的文件,
根据远程位置,
有关详细信息,请参阅处理远程数据。 示例: |
数据类型: string
| char
名称-值参数
将可选的参量对组指定为 Name1=Value1,...,NameN=ValueN
,其中 Name
是参量名称,Value
是对应的值。名称-值参量必须出现在其他参量后,但参量对组的顺序无关紧要。
在 R2021a 之前,需要使用逗号分隔每个名称和值,并用引号将 Name
引起来。
示例: GroupNumber=2
GroupNumber
— 通道组编号
数值
对于一个组,通道组编号指定为数值标量;对于多个组,指定为数值向量。该函数返回仅在这些指定通道组中找到的通道。如果未指定,则返回所有通道组的元数据。
示例: GroupNumber=[1,2]
数据类型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Channel
— 通道名称
字符串 | 字符 | 元胞
通道名称,指定为字符串或字符串数组,或者指定为字符向量或字符向量元胞数组。使用数组匹配多个通道名称中的任一个。通配符允许部分匹配。如果未指定,则返回所有通道的元数据。
示例: Channel=["*Rate","*Speed"]
数据类型: string
| char
| cell
AdditionalMetadata
— 返回其他元数据
false
(默认) | true
返回其他通道元数据,指定为 true
或 false
。
示例: AdditionalMetadata=true
数据类型: logical
输出参量
infoTable
— 通道信息
表
通道表中返回的通道信息。
版本历史记录
在 R2023a 中推出R2023a: 支持远程文件 URL
您可以直接访问存储在远程位置的 MDF 文件数据,包括 Amazon S3、Azure® Blob 存储和 HDFS。
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)