% make an l x m x n tensor of zeros

function t = tzeros(l,m,n)

if nargin == 1,
  if length(l) == 1,
    m = l;
    n = l;
  elseif length(l) == 3,
    m = l(2);
    n = l(3);
    l = l(1);
  else
    error('input must have either one or three entries')
  end
elseif nargin == 2 | nargin > 3,
  error('either one or three arguments required')
end

if l*m*n == 0,
  t = [];
else
  cols = m*n+1;
  t = zeros(l,cols);
  t(1,cols) = m;
end
