mdfInfo
Access or create MDF file metadata
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
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 Event: [1x8 eventtable]
Read the Version
property.
fileInfo.Version
ans = "4.10"
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
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
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 |
Event | eventtable | Read-only |
Limitations
mdfInfo
does not return custom file metadata fields.
Version History
Introduced in R2019bThe output object now includes an Event
property that contains a
table of events read from the MDF file.
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,:)
.
You can directly access MDF file data stored at remote locations, including Amazon S3, Azure® Blob Storage, and HDFS.
MATLAB Command
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.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)