mdfInfo
Description
returns an fileInfo
= mdfInfo(mdfFileName
)MDFInfo
object that contains information about the specified
MDF-file, including name, location, version, size, initial timestamp of the data, and more.
mdfFileName
specifies an absolute, relative, or URL path to the
MDF-file.
Examples
Access Information About MDF-File
Get the MDF-file information, and programmatically read its version.
fileInfo = mdfInfo("MDFFile.mf4");
fileInfo = MDFInfo with properties: File Details Name: "VehicleData.mf4" Path: "E:\data\VehicleData.mf4" Author: "" Department: "" Project: "" Subject: "" Comment: "Example file with demo data." Version: "4.10" InitialTimestamp: 2022-01-20 01:22:34.000000000 Creator Details ProgramIdentifier: "MATLAB" CreatorVendorName: "The MathWorks, Inc." CreatorToolName: "MATLAB" CreatorToolVersion: "9.12.0.1846952 (R2022a)" CreatorUserName: "" CreatorComment: "" File Contents Attachment: [1×8 table] ChannelGroupCount: 2
Read the Version
property.
fileInfo.Version
ans = "4.10"
Create MDFInfo Object for New File
Create and modify an MDFInfo
object for use in
configuring a new MDF-file with customized metadata.
minfo = mdfInfo; minfo.Comment = "25-Dec Shift B."; % ⋮ % Modify other properites as needed % ⋮ mdfCreate("MyMDFfile.mf4",FileInfo=minfo)
Input Arguments
mdfFileName
— MDF-file name
string | char vector
MDF-file name, specified as a string or character vector, including the necessary full or relative path. You can use a URL to specify a file on a remote server.
Depending on the location you are accessing,
mdfFileName
can take one of these forms.
Location | Form | ||||||||
---|---|---|---|---|---|---|---|---|---|
Current folder or MATLAB® path | To access a file in the current folder or MATLAB path, specify the
name of the file in Example:
| ||||||||
Other folders | To access a file in a folder other than the current folder, specify
the full or relative path name in
Example:
Example:
| ||||||||
Remote locations | To access a file in a remote location,
Based on the remote location,
For more information, see Work with Remote Data. Example:
|
Data Types: char
| string
Output Arguments
fileInfo
— MDF-file metadata information
MDFInfo
object
MDF-file metadata information, returned as an MDFInfo
object with
the following properties:
MDFInfo
Object Properties
Property Name | Data Type | Access |
---|---|---|
File Details | ||
Name | string | Read-only |
Path | string | Read-only |
Author | string | Read/write |
Department | string | Read/write |
Project | string | Read/write |
Subject | string | Read/write |
Comment | string | Read/write |
Version | string | Read/write |
InitialTimestamp | datetime | Read/write |
Creator Details | ||
ProgramIdentifier | string | Read-only |
CreatorVendorName | string | Read-only |
CreatorToolName | string | Read-only |
CreatorToolVersion | string | Read-only |
CreatorUserName | string | Read/write |
CreatorComment | string | Read/write |
File Contents | ||
Attachment | table | Read-only |
ChannelGroupCount | uint64 | Read-only |
Version History
Introduced in R2019bR2023a: mdfInfo Outputs an Object
In previous releases, mdfInfo
generated a structure output.
Starting in R2023a, the output is an MDFInfo
object. This update is
consistent with the update to the mdfCreate
function input. Where possible, the properties of this object
reflect the field names of the old structure output, so programmatic access might be
unchanged. However a few changes might impact your workflow:
Some properties of the
MDFInfo
object are read-only.The
MDFInfo.Attachment
property is now a table. You can access the first row of the table asMDFInfo.Attachment(1,:)
.
R2023a: Support for Remote File URLs
You can directly access MDF-file data stored at remote locations, including Amazon S3, Azure® Blob Storage, and HDFS.
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 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)