How can I import DIAdem measurement data into MATLAB?

47 views (last 30 days)
I have TDM files which contain measurements taken with National Instruments DIAdem software. I would like to import the data into MATLAB to visualize and post-process the data.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 26 Mar 2023
Edited: MathWorks Support Team on 29 Jun 2023
The ability to directly import DIAdem TDMATLAB files is not available in MATLAB.
To work around this issue, you can use the "loadlibrary" function as demonstrated in the following example from National Instruments™:
Reading TDM/TDMS Files with MathWorks, Inc. MATLAB® Software
https://forums.ni.com/t5/Example-Code/Reading-TDM-TDMS-Files-with-The-MathWorks-Inc-MATLAB-Software/ta-p/3996480
You can also export the measurement data from DIAdem into MS Excel or as an ASCII-formatted text file, and then import the data into MATLAB. Note that MS Excel is limited to 2^16 (65,536) rows for older versions and 2^20 (1,048,576) rows for newer versions.
To import Excel data into MATLAB you can use the "xlsread" command. The best function to use depends on the format of the text file. Several possible options are "csvread", "dlmread" or "textscan".
For more information on each of these commands please execute one of the commands below at the MATLAB command prompt:
doc xlsread
doc csvread
doc dlmread
doc textscan

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!