Skip to content

Commit 2b76f4c

Browse files
committed
update checks on SPM version
1 parent 52e07d0 commit 2b76f4c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/utils/checkDependencies.m

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@ function checkDependencies()
1818
%% check spm version
1919
try
2020
[a, b] = spm('ver');
21-
fprintf(' Using %s %s\n', a, b);
22-
if any(~[strcmp(a, SPM_main) strcmp(b, SPM_sub)])
23-
str = sprintf('%s %s %s.\n%s', ...
24-
'The current version SPM version is not', SPM_main, SPM_sub, ...
25-
'In case of problems (e.g json file related) consider updating.');
26-
warning(str); %#ok<*SPWRN>
27-
end
2821
catch
2922
error('Failed to check the SPM version: Are you sure that SPM is in the matlab path?');
3023
end
3124

25+
fprintf(' Using %s %s\n', a, b);
26+
27+
if ~strcmp(a, SPM_main) || str2num(SPM_sub) < 7219
28+
str = sprintf('%s %s %s.\n%s', ...
29+
'The current version SPM version is less than', SPM_main, SPM_sub, ...
30+
'Update with: spm_update update');
31+
warning(str); %#ok<*SPWRN>
32+
end
33+
3234
spm('defaults', 'fmri');
3335

3436
%% Check the Nifti tools are indeed there.

0 commit comments

Comments
 (0)