Sort MDF-file by ASAM standards
If you get an error when trying to read an unsorted MDF-file, sort the file with
mdfSort and read from that instead.
mdfSort( sorts the specified
MDF-file according to ASAM standards for fast reading. The sorted result overwrites the
Sort an MDF-File in Place
Sort an MDF-file, overwriting the original, and read its data.
sortedPath = mdfSort('MDFFile.mf4'); mdfObj = mdf(sortedPath); data = read(mdfObj);
Sort an MDF-File into a Copy
Create a sorted copy of an MDF-file and read its data.
sortedPath = mdfSort('UnsortedMDFFile.mf4','SortedMDFFile.mf4'); mdfObj = mdf(sortedPath); data = read(mdfObj);
UnsortedMDFFile — Original MDF-file with unsorted data
string | char
Original MDF-file without sorted data, specified as a string or character vector. Full and relative path names are allowed.
Depending on the location you are accessing,
mdfFileName can take one of these forms.
|Current folder or MATLAB® path|
To access a file in the current folder or MATLAB path, specify the
name of the file in
To access a file in a folder other than the current folder, specify
the full or relative path name in
To access a file in a remote location,
Based on the remote location,
For more information, see Work with Remote Data.
SortedMDFFile — New copy of MDF-file with sorted data
string | char
New copy of MDF-file with sorted data, specified as a string or character vector. Full and relative path names are allowed.
sortedPath — Path to sorted file
Full path to sorted file, returned as a character vector. The path includes the file name.
Version HistoryIntroduced in R2019b
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.