Main Content

tdmsinfo

Information about TDMS-file

Description

example

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.

Examples

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 some of the channel information in the file.

>> info.ChannelList(:,1:4)
ans =

  6×4 table

    ChannelGroupNumber    ChannelGroupName    ChannelGroupDescription      ChannelName  
    __________________    ________________    _______________________    _______________

            1              "Acceleration"        "CGAcceleration"        "Acceleration1"
            1              "Acceleration"        "CGAcceleration"        "Acceleration2"
            2              "Force"               "CGForce"               "Force1"       
            2              "Force"               "CGForce"               "Force2"       
            3              "Torque"              "CGTorque"              "Torque1"      
            3              "Torque"              "CGTorque"              "Torque2"      

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:

PropertyTypeDescription
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
ChannelGroupNamestring 
ChannelGroupDescriptionstring 
ChannelNamestring 
ChannelDescriptionstring 
UnitstringUnit of channel data
DataTypestringTDMS datatype in file
NumSamplesuint64Number of samples in channel

Limitations

  • TDMS functions are supported on Windows® platforms only.

Version History

Introduced in R2022a

See Also

Functions