Main Content


Information about TDMS file

Since R2022a



info = tdmsinfo(tdmsfile) returns a TdmsInfo object with properties containing general information about the TDMS file, such as file name, location, description, author, version, and list of channels.


collapse all

Get information on a TDMS file and its channels.

info = tdmsinfo("Turbine_003.tdms")
info = 

  TdmsInfo with properties:

           Path: "C:\data\tdms\Turbine_003.tdms"
           Name: "Turbine_003"
    Description: "Test the Acceleration, Force and Torque of Turbine"
          Title: "Turbine Tests"
         Author: "xyz"
        Version: "2.0"
    ChannelList: [6×8 table]

View the channel information in the file.

>> info.ChannelList
ans =

  6×8 table

    ChannelGroupNumber    ChannelGroupName    ChannelGroupDescription      ChannelName      ChannelDescription     Unit      DataType    NumSamples
    __________________    ________________    _______________________    _______________    __________________    _______    ________    __________

            1              "Acceleration"        "CGAcceleration"        "Acceleration1"     "from Clipboard"     "m/s^2"    "Double"       3312   
            1              "Acceleration"        "CGAcceleration"        "Acceleration2"     "from Clipboard"     "m/s^2"    "Double"       3312   
            2              "Force"               "CGForce"               "Force1"            "from Clipboard"     "N"        "Double"       3312   
            2              "Force"               "CGForce"               "Force2"            "from Clipboard"     "N"        "Double"       3312   
            3              "Torque"              "CGTorque"              "Torque1"           "from Clipboard"     "Nm"       "Double"       3312   
            3              "Torque"              "CGTorque"              "Torque2"           "from Clipboard"     "Nm"       "Double"       3312

Input Arguments

collapse all

TDMS file name, specified as a string.

For local files, use a full or relative path that contains a file name and extension. You also can specify a file on the MATLAB® path.

For Internet files, specify the URL. For example, to read a remote file from the Amazon S3™ cloud:

data = tdmsread("s3://bucketname/path_to_file/data.tdms");

Example: "airlinesmall.tdms"

Data Types: char | string

Output Arguments

collapse all

TDMS file information, returned as a TdmsInfo object with the following properties:

PathstringFull path to file
NamestringTDMS file name attribute
DescriptionstringTDMS file description attribute
TitlestringTDMS file title attribute
AuthorstringTDMS file author attribute
VersionstringTDMS file version attribute
ChannelListtableTDMS channel and channel group attributes

The ChannelList property value is a table with the following variables:

Table VariableTypeNotes
ChannelGroupNumberdoubleInternally created representational index of channel group
UnitstringUnit of channel data
DataTypestringTDMS datatype in file
NumSamplesuint64Number of samples in channel

Version History

Introduced in R2022a