필터 지우기
필터 지우기

Is there a way to remove one channel group from a tdms file and write a new tdms file?

조회 수: 9 (최근 30일)
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개)

Swaraj
Swaraj 2023년 3월 10일
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.
  1. To read a TDMS file and obtain its information, such as the names and properties of the channel groups, use the “tdmsinfo” function.
  2. Use “tdmsread” function to read the TDMS data into MATLAB.
  3. Remove the channel group that you want to exclude from the TDMS data structure.
  4. tdmsData.(channelGroupToRemove) = [];
  5. Also remove it from the “ChannelList” table in the “tdmsInfo” object.
  6. 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:

카테고리

Help CenterFile Exchange에서 TDMS Format Files에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by