Dr. Andreas Bruns and I have found a possible workaround for
the problem associated with the following error messages:
Temporal non-sphericity (over voxels) : ...REML estimation
ReML Block - 1
ReML Iteration : 1 ...NaN
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = -1.000000e+00.
In spm_reml at 87
In spm_spm at 855
In spm_config_fmri_est>run_est at 382
In spm_jobman>run_struct1 at 1379
In spm_jobman>run_struct1 at 1387
In spm_jobman>run_struct1 at 1387
In spm_jobman>run_struct at 1346
??? Error using ==> svd
NaN or Inf prevents convergence.
It seems that some versions of matlab (7.1.0.183 R14 sp 3) have an
optimization for y*y' that produces NaN's for some values of y.
There may be other problems that are caused by this that are not addressed
by the following workaround.
spm_spm.m starting at line 705
if length(j)
q = size(j,2);
s = s + q;
q = spdiags(sqrt(trRV./ResSS(j)'),0,q,q);
Y = Y(:,j)*q;
% remove: Cy = Cy + Y*Y';
YT = Y'; % added
Cy = Cy + Y*YT; % added
end
|