Is there a way to remove one channel group from a tdms file and write a new tdms file?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Using the new tdms functions brought in with 2022b (tdmsread, tdmswrite, tdmsinfo, tdmswriteprop, etc) what is the best way to take an existing tdms file and remove one channelgroup from it and write a new tdms file with the new table? Is there an efficent way of maintaining the existing tdms props and writeing that to the new tdms file as well? TDMS files would have 3 or more channel groups with a minimum of 5 channels in each group that would need to be transfered to the new tdms file. Thanks for the help
1 comentario
Respuestas (1)
Swaraj
el 10 de Mzo. de 2023
You can execute the following steps to remove a channel group from an existing TDMS file and create a new TDMS file with the updated data.
- To read a TDMS file and obtain its information, such as the names and properties of the channel groups, use the “tdmsinfo” function.
- Use “tdmsread” function to read the TDMS data into MATLAB.
- Remove the channel group that you want to exclude from the TDMS data structure.
- tdmsData.(channelGroupToRemove) = [];
- Also remove it from the “ChannelList” table in the “tdmsInfo” object.
- Use “tdmswrite” function to write the updated TDMS data and metadata to a new file.
Please go through the following Documentations for more details.
For “tdmsinfo” function:
For “tdmsread” function:
For “tdmswrite” function:
0 comentarios
Ver también
Categorías
Más información sobre TDMS Format Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!