Hi When I try to install SPM8 I get the following error message:Initialising SPM...Error using fileparts Too many output arguments. Error in cfg_util>local_initapps (line 1217) [p n

5 views (last 30 days)
Hi When I try to install SPM8 I get the following error message:Initialising SPM...Error using fileparts Too many output arguments.
Error in cfg_util>local_initapps (line 1217) [p n e v] = fileparts(appcfgs{k});
Error in cfg_util (line 587) local_initapps;
Error in spm_jobman (line 149) cfg_util('initcfg'); % This must be the first call to cfg_util
Error in spm (line 344) spm_jobman('initcfg');
Error while evaluating uicontrol Callback
What am I supposed to do? Thanks for your help Pierre

Accepted Answer

Geoff Hayes
Geoff Hayes on 23 Jul 2014
Edited: Geoff Hayes on 23 Jul 2014
According to fileparts, this function returns at most three output parameters
[pathstr,name,ext] = fileparts(filename)
whereas in your code, there is an attempt to retrieve four
[p n e v] = fileparts(appcfgs{k});
You will need to remove the v parameter from the output list (line 1217 of local_initapps) and check to see how this parameter is used elsewhere in the code.
NOTE I just downloaded SPM8, and the local_initapps function (in the cfg_util.m file) did not have the v parameter
function local_initapps
% add application data
if isdeployed
cfg_mlbatch_appcfg_master;
else
appcfgs = which('cfg_mlbatch_appcfg','-all');
cwd = pwd;
dirs = cell(size(appcfgs));
for k = 1:numel(appcfgs)
% cd into directory containing config file
[p n e] = fileparts(appcfgs{k}); % three output params only
Perhaps try downloading the SPM8 code again to get the correct (most recent?) version. The version info in this file was
% $Id: cfg_util.m 4252 2011-03-15 17:49:51Z volkmar $
Perhaps you are using an older version (?)
  1 Comment
Pierre Brugieres
Pierre Brugieres on 23 Jul 2014
I have downloaded a new version of SPM8 and it works now OK. the old version neverthlessed worked also well with matlab 2011... Thank you Geoff! Pierre

Sign in to comment.

More Answers (0)

Categories

Find more on Read, Write, and Modify Image in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!