You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: admTaylorArray.m
    path of file: ./repos/d2d/arFramework3/ThirdParty/StrucID/adimat/tvector_directderivs
    
    the code of the file until where you have to start completion: % function T = admTaylorArray(varargin)
%   concatenate a number of derivative objects to a Jacobian matrix
%
% This file is part of the ADiMat runtime environment, and belongs
% to the tvector_directderivs derivative "class".
%
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% Copyright 2001-2009 Andre Vehreschild, Institute for Scientific Computing
%                     RWTH Aachen University
function Jac = admTaylorArray(varargin)
  ndd = size(varargin{1}, 1);
  maxOrder = size(varargin{1}, 2);
  nCompInResult = admGetTotalNumel(varargin{:}) ./ (max(ndd, 1).*maxOrder);
  Jac = zeros(nCompInResult, ndd, maxOrder);
  resStart = 0;
  resEnd = 0;
  for argi=1:nargin
    arg = varargin{argi}
    
function T = admTaylorArray(varargin)
%   concatenate a number of derivative objects to a Jacobian matrix
%
% This file is part of the ADiMat runtime environment, and belongs
% to the tvector_directderivs derivative "class".
%
% Copyright 2010-2012 Johannes Willkomm, Institute for Scientific Computing
% Copyright 2001-2009 Andre Vehreschild, Institute for Scientific Computing
%                     RWTH Aachen University
function Jac = admTaylorArray(varargin)
  ndd = size(varargin{1}, 1);
  maxOrder = size(varargin{1}, 2);
  nCompInResult = admGetTotalNumel(varargin{:}) ./ (max(ndd, 1).*maxOrder);
  Jac = zeros(nCompInResult, ndd, maxOrder);
  resStart = 0;
  resEnd = 0;
  for argi=1:nargin
    arg = varargin{argi};
    resStart = resEnd + 1;
    resEnd = resEnd + prod(size(arg)) ./ (ndd.*maxOrder);
    for i=1:ndd
      for o=1:maxOrder
        dd = arg(i, o, :);
        Jac(resStart:resEnd, i, o) = dd(:);
      end