Skip to content

Commit

Permalink
Fix tsdf_values_idx.m for other tsdf filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
KarsVeldkamp committed Mar 11, 2024
1 parent e471ca2 commit c916fb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tsdf_values_idx.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function indices = tsdf_values_idx(metadata_list, X, week)
function indices = tsdf_values_idx(metadata_list, suffix)
indices = [];
for i = 1:length(metadata_list)
% Use regular expression to match the pattern
expression = sprintf('WatchData\\.(PPG|IMU|EDA|ECG)\\.Week%s\\.raw_segment\\d+_%s\\.bin', num2str(week), X);
expression = ['**' suffix '.bin'];
if ~isempty(regexp(metadata_list{i}.file_name, expression, 'once'))
indices = [indices, i];
end
Expand Down

0 comments on commit c916fb1

Please sign in to comment.