A function that I am using is using
spm_existfile in the background. Currently, I always get this error:
spm_existfile("/absolute/path/to/my/file.nii") Error using spm_existfile Input must be a string.
This is strange, because 1.) I cannot find the error message in the function definition itself and 2.)
spm_existfile is just a thin wrapper around
s = exist(filename,'file') > 0. When I only execute this code everything works fine (i.e. s = 1).
Does anyone know what’s going on here? The only guess that I have right now is that it must have something to do with this note from the docs:
% This compiled routine is equivalent to:
% >> s = exist(filename,‘file’) == 2;
% and was written for speed purposes. The differences in behaviour are that
% spm_existfile does not look in MATLAB’s search path and does not perform
% tilde ‘~’ expansion.
P.S.: I am using Ubuntu 22.04