Hi Waseem,
I understand that you are facing an issue when the TDMS file has two groups with different frequencies.
The workaround here is to process both the groups separately:
- Create separate variables or data structures to store data from each group.
- Process each group independently based on its frequency.
Here's an example:
% Load the TDMS file using the appropriate library or function.
% Replace 'your_tdms_file.tdms' with the actual file path.
tdmsFile = tdmsread('your_tdms_file.tdms');
% Identify the groups and their properties
groupNames = fieldnames(tdmsFile.groups);
numGroups = numel(groupNames);
% Process each group separately
for i = 1:numGroups
groupName = groupNames{i};
groupData = tdmsFile.groups.(groupName);
% Check the frequency of the group and process accordingly
if groupData.Frequency == 50
% Process data for a 50Hz group
% You may have specific code here for 50Hz data
elseif groupData.Frequency == 1000
% Process data for a 1000Hz group
% You may have specific code here for 1000Hz data
end
end
Here in this code, we iterate through each group in TDMS file, check its frequency and process the data accordingly.
Thank you,
Rishav Saha