Main Content

mdfAddChannelGroupMetadata

Add channel group and channel metadata to timetable

Description

example

TTout = mdfAddChannelGroupMetadata(TTin) adds default or inferred channel group and channel metadata to the input timetable and returns the resulting timetable. For those custom properties that exist and have values, no changes are made. The function adds any missing custom properties and sets any unset properties with default or derived values. Channel group metadata are added as custom properties starting with ChannelGroup*. Channel metadata are added as custom properties starting with Channel*, and have an element for each variable.

You can use the same timetable for input and output.

Examples

collapse all

Modify an existing timetable of MDF data to add custom property metadata.

Examine the properties of an existing timetable.

TTin.Properties
ans = 

  TimetableProperties with properties:

             Description: '10 ms'
                UserData: []
          DimensionNames: {'Time'  'Variables'}
           VariableNames: {1×74 cell}
    VariableDescriptions: {1×74 cell}
           VariableUnits: {1×74 cell}
      VariableContinuity: []
                RowTimes: [1993×1 duration]
               StartTime: 0.00082554 sec
              SampleRate: 100.0000
                TimeStep: 0.01 sec
        CustomProperties: No custom properties are set.

Add metadata and examine the properties of the result for comparison.

TTout = mdfAddChannelGroupMetadata(TTin);
TTout.Properties.CustomProperties
ans = 

CustomProperties with properties:

    ChannelGroupAcquisitionName: ""
            ChannelGroupComment: ""
         ChannelGroupSourceInfo: [1×1 struct]
             ChannelDisplayName: [""    ""    ""    ""    ""    ""    ""    ""    ""    ""    …    ]
                 ChannelComment: [""    ""    ""    ""    ""    ""    ""    ""    ""    ""    …    ]
                    ChannelUnit: [""    ""    ""    ""    ""    ""    ""    ""    ""    ""    …    ]
                    ChannelType: [FixedLength    FixedLength    FixedLength    FixedLength    …    ]
                ChannelDataType: [IntegerUnsignedLittleEndian    IntegerUnsignedLittleEndian    …    ]
                 ChannelNumBits: [8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 … ]
           ChannelComponentType: [None    None    None    None    None    None    None    None    …    ]
         ChannelCompositionType: [None    None    None    None    None    None    None    None    …    ]
              ChannelSourceInfo: [1×74 struct]
              ChannelReadOption: [Missing    Missing    Missing    Missing    Missing    …    ]

Input Arguments

collapse all

Input timetable of MDF data, with or without channel group and channel metadata.

Data Types: timetable

Output Arguments

collapse all

Output timetable of MDF data, with custom properties for channel group and channel metadata.

Version History

Introduced in R2022a

See Also

Functions