Back to the main page.

Bug 2488 - issubfield not available from ft_defaults

Reported 2014-03-03 15:14:00 +0100
Modified 2014-03-12 12:19:38 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: All
Operating System: All
Importance: P5 normal
Assigned to: Jörn M. Horschig
Depends on:
See also:

Guillaume - 2014-03-03 15:14:52 +0100

When initialising FieldTrip, the 'utilities' folder is not yet in MATLAB path so 'issubfield' cannot be found when returning a warning. >> addpath /home/foo/spm >> addpath /home/foo/another_spm >> addpath /home/foo/fieldtrip >> ft_defaults Undefined function 'issubfield' for input arguments of type 'double'. Error in warning_once>fieldnameFromStack (line 195) if ~issubfield(ft_previous_warnings, fixname(stack(end).name)) Error in warning_once (line 123) [tmpfname ft_default.warning.identifier line] = fieldnameFromStack(ft_default.warning.identifier); Error in ft_defaults>checkMultipleToolbox (line 219) [ws, warned] = warning_once(sprintf('Multiple versions of %s on your path will confuse FieldTrip', toolbox)); Error in ft_defaults (line 84) checkMultipleToolbox('spm', 'spm.m');

Jörn M. Horschig - 2014-03-04 09:57:25 +0100

Hi Guillaume, thanks for reporting this, I fixed this by putting the *subfield functions into the private folder where warning_once is located: 545 $ svn ci private/*subfield.m -m "bugfix #2488 - added subfield functions to private" Adding private/getsubfield.m Adding private/issubfield.m Adding private/rmsubfield.m Adding private/setsubfield.m Committed revision 9253. jorhor@mentat001:~/FieldTrip/trunk 546 $ svn propset autosync private/*subfield.m property 'autosync' set on 'private/issubfield.m' property 'autosync' set on 'private/rmsubfield.m' property 'autosync' set on 'private/setsubfield.m' jorhor@mentat001:~/FieldTrip/trunk 547 $ svn ci private/*subfield.m -m "bugfix #2488 - autosync on" Sending private/issubfield.m Sending private/rmsubfield.m Sending private/setsubfield.m Committed revision 9254.