function Z = UnitDose(A,xDim,yDim,zDim)

[p, q] = size(A);

%size(A)

e = ones(q,1);
%e = [ones(23,1);zeros(q-23,1)];
%for k = 1:13
%e = [zeros(k-1,1); ones(1,1); zeros(23-k,1) ;zeros(q-23,1)];

R = A*e;

for z=1:zDim

   for i = 1:yDim
      for j = 1:xDim
         Z(i,j,z) = R( ((z-1)*(xDim*yDim)) + (i-1)*xDim + j);
      end
   end
   
figure
mesh(Z(:,:,z))

end

