Skip to content

Commit 56d5008

Browse files
committed
use bids matlab function for octave compatibility
1 parent 8ff39bc commit 56d5008

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/utils/identify_rawsources.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
verbose = true;
3434
end
3535

36-
if endsWith(derivatives, '_seg8.mat')
36+
if bids.internal.ends_with(derivatives, '_seg8.mat')
3737
derivatives = strrep(derivatives, '_seg8.mat', '.nii');
38-
elseif endsWith(derivatives, '_uw.mat')
38+
elseif bids.internal.ends_with(derivatives, '_uw.mat')
3939
derivatives = strrep(derivatives, '_uw.mat', '.nii');
4040
end
4141

src/utils/identify_sources.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@
7171
return
7272
end
7373

74-
if endsWith(derivatives, '_seg8.mat')
74+
if bids.internal.ends_with(derivatives, '_seg8.mat')
7575

7676
prefix_based = false;
7777

7878
derivatives = strrep(derivatives, '_seg8.mat', '.nii');
7979

80-
elseif endsWith(derivatives, '_uw.mat')
80+
elseif bids.internal.ends_with(derivatives, '_uw.mat')
8181

8282
prefix_based = false;
8383

@@ -102,17 +102,17 @@
102102
else
103103
% remove the prefix of the last step
104104

105-
if startsWith(bf.prefix, 's') || startsWith(bf.prefix, 'u')
105+
if bids.internal.starts_with(bf.prefix, 's') || bids.internal.starts_with(bf.prefix, 'u')
106106
bf.prefix = bf.prefix(2:end);
107107

108-
elseif startsWith(bf.prefix, 'w')
108+
elseif bids.internal.starts_with(bf.prefix, 'w')
109109
bf.prefix = bf.prefix(2:end);
110110
add_deformation_field = true;
111111

112-
elseif startsWith(bf.prefix, 'rp_a')
112+
elseif bids.internal.starts_with(bf.prefix, 'rp_a')
113113
bf.prefix = bf.prefix(4:end);
114114

115-
elseif startsWith(bf.prefix, 'mean')
115+
elseif bids.internal.starts_with(bf.prefix, 'mean')
116116
% TODO mean may involve several files from the source (across runs
117117
% and sessions
118118
% prefixes = {

0 commit comments

Comments
 (0)