Hi John, SPMers,
My question is about the parameter samp in the following code from
spm_coreg.m:
for samp=flags.sep(:)',
[x,fval]=spm_powell(x(:),xi,sc,mfilename,VG,VF,samp,flags.cost_fun,flags.fwhm);
x=x(:)';
end;
According to this code, samp = flags.sep, which is the optimisation
sampling step, by default [4 2]. So, for the first call, samp would be 4
then 2.
Now, in the loop we call spm_powell.m:
function [p,f] = spm_powell(p,xi,tolsc,func,varargin)
p = p(:);
f = feval(func,p,varargin{:});
varargin beeing VG,VF,samp,flags.cost_fun,flags.fwhm.
As you explained me in a previous mail, this should call spm_coreg
again, this time executing optfun(x,VG,VF,s,cf,fwmh), s beeing samp that
is to say by default 4, or 2.
Then in the function optfun,
if nargin<6, fwhm = [7 7]; end;
if nargin<5, cf = 'mi'; end;
if nargin<4, s = [1 1 1]; end;
This last line is a bit confusing: how is it that the default value for
s is now a vector of ones instead of samp, initialised in the loop samp
= flags.sep(:)'?
Regards,
Remi.
|