TDMS Reader

Version 2.6 (46.7 KB) by Jim Hokanson
Read TDMS files v1 & v2 without DLL
Updated 11 Nov 2020

View License

Reads TDMS files into Matlab.

Simplest usage is:
data = TDMS_getStruct(filename.tdms);

- supports reading v2 files
- doesn't require the NI DLL, thus it doesn't require 32bit windows
- supports interleaved data
- allows only reading names & properties to get a quick feel for what is in the file
- allows reading specific subsets of the data for limited memory usage

For subset retrieval examples see:

Cite As

Jim Hokanson (2024). TDMS Reader (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: TDMS file merge and reader

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

- added complex data reading support
- bug fix for skipping channels where data are strings
- fixed issue where first segment didn't define objects
- lots of documentation updates

Added simple usage example to description

Just added a link to the description

Bug fix (potentially silent bug), see version notes file.

Fixed some bugs with interleaved data, as well as a bug in reading timestamp data (not properties) which failed with dates prior to 1904.

Fixed a bug in which an error check I had in place was incorrectly being thrown.
Fixed parsing of object names with ' and / characters.

Also allows for only reading .tdms_index files (for debugging)

2.2 Update:
Improved speed and specificity with regard to subset handling

I was a bit quick with the last update (v2.0). It had some bugs with respect to parsing subsets of the data.

The main update to version 2 is the ability to retrieve a subset of the data from channels. In addition I've added some extra wrappers to handle data retrieval.

Ver. 1.2 - I had an incorrect minus sign when reading the timestamp property which yielded an invalid year. Data timestamp reads were correct and previously tested :)
Thanks to Ed Zechmann for pointing out the problem! Added extra conv. script v3

Fixed a major bug with reading unicode. Other small bug fixes and improvements can be seen in TDMS_VERSION_INFO.

Updated description