Main Content


Finalize MDF file by ASAM standards

Since R2021b



mdfFinalize(UnfinalizedMDFFile) sorts and finalizes the specified MDF file according to ASAM standards, and overwrites the original file.


mdfFinalize(UnfinalizedMDFFile,FinalizedMDFFile) creates a sorted, finalized copy of the MDF file with the specified name, FinalizedMDFFile.


finalizedPath = mdfFinalize(___) returns an output argument, finalizedPath, indicating the full path to the sorted, finalized file, including the file name.


collapse all

Finalize an MDF file, overwriting the original.

finalizedPath = mdfFinalize('MDFFile.mf4');
mdfObj = mdf(finalizedPath);

Finalize an MDF file, creating a separate copy from the original.

finalizedPath = mdfFinalize('UnfinalizedMDFFile.mf4','FinalizedMDFFile.mf4');
mdfObj = mdf(finalizedPath);

Input Arguments

collapse all

Original unfinalized MDF file, 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 filename, including the file extension.

Example: "myMdfFile.mf4"

Other folders

To access a file in a folder other than the current folder, specify the full or relative path name in filename.

Example: "C:\myFolder\myMdfFile.mf4"

Example: "\dataDir\myMdfFile.mf4"

Remote locations

To access a file in a remote location, filename must contain the full path of the file specified as a uniform resource locator (URL) of the form:


Based on the remote location, scheme can be one of the values in this table.

Remote Locationscheme
Amazon S3™s3
Windows Azure® Blob Storagewasb, wasbs

For more information, see Work with Remote Data.

Example: "s3://bucketname/path_to_file/myMdfFile.mf4"

Example: 'UnfinalizedMDFFile.mf4'

Data Types: char | string

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

Example: 'FinalizedMDFFile.mf4'

Data Types: char | string

Output Arguments

collapse all

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

Version History

Introduced in R2021b

expand all

See Also