function FFF = XTinterp(PPP,x)

dim3=size(PPP,3);

if dim3==1
    dim1=size(PPP,1);dim2=size(PPP,2);

    [X1 Y1 ]=meshgrid(1:dim2,1:dim1);

    [X2 Y2 ]=meshgrid(1:1/x:dim2,1:1/x:dim1);

    FFF = interp2(X1,Y1,PPP,X2,Y2,'linear');

else
    [dim1,dim2,dim3]=size(PPP);

    [X1 Y1 Z1]=meshgrid(1:dim2,1:dim1,1:dim3);

    [X2 Y2 Z2]=meshgrid(1:1/x:dim2,1:1/x:dim1,1:1/x:dim3);

    FFF = interp3(X1,Y1,Z1,PPP,X2,Y2,Z2,'cubic');
    
end
FFF = My_paddzero(FFF,size(X2)+1);

