Main Content

mdfSort

Sort MDF-file by ASAM standards

Description

If you get an error when trying to read an unsorted MDF-file, sort the file with mdfSort and read from that instead.

example

mdfSort(UnsortedMDFFile) sorts the specified MDF-file according to ASAM standards for fast reading. The sorted result overwrites the original file.

example

mdfSort(UnsortedMDFFile,SortedMDFFile) creates a sorted copy of the MDF-file with the specified name, SortedMDFFile.

example

sortedPath = mdfSort(___) returns an output argument, sortedPath, indicating the full path to the sorted file, including the file name.

Note

This function is supported only on 64-bit Windows® operating systems.

Examples

collapse all

Sort an MDF-file, overwriting the original, and read its data.

sortedPath = mdfSort('MDFFile.mf4');
mdfObj = mdf(sortedPath);
data = read(mdfObj);

Create a sorted copy of an MDF-file and read its data.

sortedPath = mdfSort('UnsortedMDFFile.mf4','SortedMDFFile.mf4');
mdfObj = mdf(sortedPath);
data = read(mdfObj);

Input Arguments

collapse all

Original MDF-file without sorted data, specified as a string or character vector. Full and relative path names are allowed.

Example: 'UnsortedMDFFile.mf4'

Data Types: char | string

New copy of MDF-file with sorted data, specified as a string or character vector. Full and relative path names are allowed.

Example: 'SortedMDFFile.mf4'

Data Types: char | string

Output Arguments

collapse all

Full path to sorted file, returned as a character vector. The path includes the file name.

Version History

Introduced in R2019b

See Also

Functions