@@ -65,23 +65,21 @@ function bidsConcatBetaTmaps(opt, funcFWHM, deleteIndBeta, deleteIndTmaps)
65
65
66
66
saveAndRunWorkflow(matlabbatch , ' concat_betaImg_tMaps' , opt , subID );
67
67
68
- removeBetaImgTmaps(beta_maps , t_maps , deleteIndBeta , deleteIndTmaps );
68
+ removeBetaImgTmaps(t_maps , deleteIndBeta , deleteIndTmaps , ffxDir );
69
69
70
70
end
71
71
end
72
72
73
73
end
74
74
75
- function removeBetaImgTmaps(beta_maps , t_maps , deleteIndBeta , deleteIndTmaps )
75
+ function removeBetaImgTmaps(t_maps , deleteIndBeta , deleteIndTmaps , ffxDir )
76
76
77
77
% delete maps
78
78
if deleteIndBeta
79
79
80
80
% delete all individual beta maps
81
81
fprintf(' Deleting individual beta-maps ... ' );
82
- for iBeta = 1 : length(beta_maps )
83
- delete(beta_maps{iBeta }(1 : end - 2 ));
84
- end
82
+ delete(fullfile(ffxDir , [' beta_*' , ' .nii' ]));
85
83
fprintf(' Done. \n\n\n ' );
86
84
87
85
end
@@ -103,7 +101,4 @@ function removeBetaImgTmaps(beta_maps, t_maps, deleteIndBeta, deleteIndTmaps)
103
101
fprintf(' Done. \n\n\n ' );
104
102
end
105
103
106
- % delete mat files
107
- delete(fullfile(ffxDir , [' 4D_*' , num2str(funcFWHM ), ' .mat' ]));
108
-
109
104
end
0 commit comments