Try this function...
%%%%%%%%%%%%%%%%%%%
function [varargout] = samp(F,X,Y)
if nargin<3,
Y = X(:,:,2);
X = X(:,:,1);
end;
p = [1 1 0 1 1 0];
F = spm_bsplinc(F,p);
if nargout==1,
if size(F,3)==2,
G = dartel2('comp',F,cat(3,X,Y));
else
G = spm_bsplins(F,X,Y,ones(size(X)),p);
end;
varargout = {G};
else
[G,dX,dY] = spm_bsplins(F,X,Y,ones(size(X)),p);
varargout = {G,dX,dY};
end;
%%%%%%%%%%%%%%%%%%%
Best regards,
-John
On Monday 19 May 2008 16:05, Defeng WANG wrote:
> Dear John,
>
> I found that the 'samp' option is not defined in 2D DARTEL. That is,
>
> >>>new_f = dartel2('samp',f, u);
>
> ??? samp is not ready yet.
>
> Could you please update 2D DARTEL to make this function available?
>
> Best wishes,
> Vincent
|