function A = makemat(x, y)
%MAKEMAT Create a matrix from two row vectors
%   A = MAKEMAT(X, Y) creates a 2-row matrix A using
%   the row vector X as the first row and row vector
%   Y as the second row. If X and Y have different lengths
%   then the shorter vector is padded with zeros on the
%   end.

lenx = length(x);
leny = length(y);

if lenx == leny
  A = [x; y];
elseif lenx < leny
  A = [x, zeros(1, leny - lenx); y];
else
  A = [x; y, zeros(1, lenx - leny)];
end

end

