function T=mtrans(x,y,z)

x=reshape(x,1,length(x));
y=reshape(y,1,length(y));
z=reshape(z,1,length(z));

m=max([length(x) length(y) length(z)]);
x(end:m)=x(end);
y(end:m)=y(end);
z(end:m)=z(end);

for n=1:m;
    T(:,:,n)=trans(x(n),y(n),z(n));
end

end