Main Content

channelList

(Not recommended) Information on available MDF groups and channels

The channelList function is not recommended and might be removed in a future release. Use mdfChannelGroupInfo (Vehicle Network Toolbox) and mdfChannelInfo (Vehicle Network Toolbox) instead. See Version History.

Description

chans = channelList(mdfobj) returns a table of information about channels and groups in the specified MDF file.

example

channelList(mdfObj,chanName) searches the MDF file to generate a list of channels matching the specified channel name. The search by default is case-insensitive and identifies partial matches. A table is returned containing information about the matched channels and the containing channel groups. If no matches are found, an empty table is returned.

channelList(mdfObj,chanName,'ExactMatch',true) searches the channels for an exact match, including case sensitivity. This is useful if a channel name is a substring of other channel names.

example

Examples

collapse all

View all available MDF channels.

mdfObj = mdf('File01.mf4');
chans = channelList(mdfObj)
chans =

  4×9 table

                ChannelName                 ChannelGroupNumber    ChannelGroupNumSamples
    ____________________________________    __________________    ______________________

    "Float_32_LE_Offset_64"                         2                     10000
    "Float_64_LE_Primary_Offset_0"                  2                     10000
    "Signed_Int16_LE_Offset_32"                     1                     10000
    "Unsigned_UInt32_LE_Primary_Offset_0"           1                     10000

Filter on channel names.

chans = channelList(mdfObj,'Float')
chans =

  2×9 table

             ChannelName             ChannelGroupNumber    ChannelGroupNumSamples
    _____________________________    __________________    ______________________

    "Float_32_LE_Offset_64"                  2                     10000
    "Float_64_LE_Primary_Offset_0"           2                     10000
chans = channelList(mdfObj,'Float','ExactMatch',true)
chans =

  0×9 empty table

Input Arguments

collapse all

MDF file, specified as an mdf object.

Example: mdf('File01.mf4')

Name of channel, specified as a character vector or string. By default, case-insensitive and partial matches are returned.

Example: 'Channel2'

Data Types: char | string

Output Arguments

collapse all

Information on available MDF channels, returned as a table. To access specific elements, you can index into the table.

Version History

Introduced in R2018b

collapse all

R2023b: channelList Function Not Recommended

The mdf object and its channelList function are not recommended and might be removed in a future release.

You should update your code to use mdfChannelGroupInfo (Vehicle Network Toolbox), mdfChannelInfo (Vehicle Network Toolbox), and related functions instead. Note that these functions return tables with different variables.

For more details, see Transition Your mdf Object Code (Vehicle Network Toolbox).

See Also

Functions