Main Content

readall

Read all data in TDMS datastore

Since R2022a

Description

data = readall(tdmsds) reads all the data in the datastore specified by tdmsds, and returns a cell array of tables or timetables. Each element of the cell array corresponds to a channel group in the datastore file data.

The function returns a cell array of tables or a cell array of timetables, depending on the value of the tdmds.RowTimes property. See tdmsDatastore.

After the readall function returns all the data, it resets tdmsds to point to the beginning of the datastore.

example

Examples

collapse all

Read all the data from a multiple file TDMS datastore into an array of tables.

Set up datastore and read all its data.

tdmsds = tdmsDatastore("C:\data\tdms");
data = readall(td)
data =

  1×3 cell array

    {9936×2 table}    {9936×2 table}    {9936×2 table} 

View part of the data.

data{1}
ans =

  9936×2 table

    Acceleration1    Acceleration2
    _____________    _____________

       -1.9851                0   
       -3.9702                0   
        11.911           1.5521   
        5.9553          -1.5521   
        1.9851          -4.6562   
        5.9553           4.6562   
        3.9702          -1.5521   
        3.9702          -4.6562   

          :                :      

       -4.8046           6.7826   
       -7.2068           2.2609   
       -7.2068           4.5218   
       -7.2068           6.7826   
       -2.4023           9.0435   
       -2.4023           4.5218   
       -9.6091           2.2609   
       -12.011           4.5218   

Input Arguments

collapse all

TDMS datastore, specified as a TDMSDatastore object.

Example: tdmsds = tdmsDatastore("C:\data\tdms")

Output Arguments

collapse all

Output data, returned as a cell array of tables from all TDMS files in the datastore.

Version History

Introduced in R2022a

See Also

Functions