Hi,

I’m trying to estimate a nonlinear DCM but have encountered problem with regard to the different slice-timings for the model’s various regions.

The problem arises due to a matrix dimension mismatch in spm_nlsi_GN.m:

257      e     = spm_vec(y) - spm_vec(f) - dfdu*p(iu);

I have managed to remedy this by adding the following lines in spm_int_B_nlDCM_fMRI.m after line 236 (just before the return)

But wanted to check with the DCM experts whether or not this is a reasonable thing to do:

% down-sample delays

%----------------------------------------------------------------------

if isfield(M, 'delays')

   

    u    = size(U.u,1);

    tmp  = zeros(ns, M.l);

    dtmp = zeros(ns, M.l);

    

    % output times for j-th area

    %----------------------------------------------------------------------

    for j = 1:M.l

        s        = ceil([0:ns-1]*u/ns) + delays(j);

        tmp(:,j) = y(s_ind(s), j);

    end

    y   = tmp;

end

…taken from spm_int.m line 165 to 178.

 

Might this fix introduce other problems or is it okay?

 

Thank you

Johannes Tünnerhoff