Dear Glad,
You are not using the latest version of SPM12 so I would first recommend
you update as spm_reml.m has changed in the meantime.
The fact you reached this part of the code means that it's a rather
challenging non-sphericity estimation: are you sure you specified your
model correctly?
Best regards,
Guillaume.
On 08/05/18 17:18, Paul Glad Mihai wrote:
> I tried to run a 2nd level flexible factorial estimation and got the
> following error:
>
> Failed 'Model estimation'
> Undefined function or variable 'dh'.
> In file "/data/p_nmc002/spm12.6906/spm_reml.m" (v5223), function
> "spm_reml" at line 106.
>
> Here's the code for the line:
>
> for i = 1:D
> if min(real(eig(full(C)))) < 0
>
> % increase regularisation and re-evaluate C
> %--------------------------------------------------------------
> t = t - 1;
> h = h - dh; % <----- line 106
> dh = spm_dx(dFdhh,dFdh,{t});
> h = h + dh;
> C = sparse(n,n);
> for i = 1:m
> C = C + Q{i}*h(i);
> end
> else
> break
> end
> end
>
> Does `dh` first need to be specified to something like 0?
>
> Regards,
> Glad
>
--
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|