How do I import specific channels from multiple consecutive tdms files into workspace?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hey there,
I'm trying to import specific channels from multiple tdms files to my MatLab workspace using tdmsDatastore. With the documentation given I can't figure out how to import just specific channels due to a lack of memory.
All tdms files in one folder are from the same measurment, during the measuremnt the data is saved into a single file when reaching 1.5 GB and a new tdms file is created. Multiple sensors are used and eachs ensor saves the data in one channel. For the analysis I'm planning I only need a few channels, which would lower the size of the imported data. I would like to read in and reassemble certain channels of the individual files. Ideally, each channel should be stored in the same struc.
The files are stored in one folder with the same name like the following: folder: "Experimental_data"; files:"Experimental_data_time";"Experimental_data_time_2";"Experimental_data_time_3";... .
How can I do so? I hope anybody can help, so far there aren't many threads on the topic of tdmsDatastore, read, etc.
Thank you very much!
0 Kommentare
Antworten (1)
Harald
am 24 Okt. 2023
Hi Philipp,
in the documentation, find the SelectedChannelGroup and SelectedChannels properties.
The doc example shows how to use them, e.g.:
td = tdmsDatastore("C:\data\tdms");
%...
td.SelectedChannelGroup = "Force";
If you have large data and need to work with all channels, you can also use the read command (rather than readall) and control the number of rows imported at a time by setting the ReadSize property.
Best wishes,
Harald
Siehe auch
Kategorien
Mehr zu TDMS Format Files finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!