Skip to content

Commit 7fafd39

Browse files
committed
Bug fix in the MATLAB interface for recent SPM standalones
In SPM12 standalone r6685 and above, the MATLAB function mfilename() is overloaded and care must now be taken when calling it. This change is backward compatible with older SPM versions.
1 parent a5ad273 commit 7fafd39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/interfaces/matlab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ def _gen_matlab_command(self, argstr, script_lines):
168168
prescript = self.inputs.prescript
169169
postscript = self.inputs.postscript
170170

171-
# postcript takes different default value depending on the mfile argument
171+
# prescript takes different default value depending on the mfile argument
172172
if mfile:
173-
prescript.insert(0, "fprintf(1,'Executing %s at %s:\\n',mfilename,datestr(now));")
173+
prescript.insert(0, "fprintf(1,'Executing %s at %s:\\n',mfilename(),datestr(now));")
174174
else:
175175
prescript.insert(0, "fprintf(1,'Executing code at %s:\\n',datestr(now));")
176176
for path in paths:

0 commit comments

Comments
 (0)