Main Content

mdfWrite

Write timetable data to MDF-file

    Description

    example

    mdfWrite(mdfFile,mdfData) writes a timetable of MDF data to a new channel group appended at the end of the specified MDF-file. The timetable can also contain channel group and channel metadata, which you can add using the function mdfAddChannelGroupMetadata before performing the write operation. If the file does not exist, the function creates it.

    mdfWrite(mdfFile,mdfData,GroupNumber=chanGrpNum) writes data to the specified channel group index. If unspecified, data is written to a new channel group appended to the end of existing channel groups.

    Examples

    collapse all

    Write data from a timetable to a specific channel group index in an MDF-file.

    mdfWrite("MDFFile.mf4",mdfDataTT,GroupNumber=1)

    Input Arguments

    collapse all

    MDF-file name to write to, specified as a string or character vector. The file name can be a relative or absolute path. The name must include the extension .dat, .mdf, or .mf4. If the file does not exist, the function creates it.

    Example: "MDF_25Dec.mf4"

    Data Types: char | string

    Data, specified as a timetable, to write to the MDF-file.

    Data Types: timetable

    Version History

    Introduced in R2022a