function y = repmat_own(x,n,m)
% function y = repmat_own(x,n,m) tiles matrix x into matrix y n*m times
[xn xm] = size(x);
if (n < 1) | (m < 1)
  if (n < 1)
    y = zeros(0,xm);
  end
  if (m < 1)
    y = zeros(xn,0);
  end
  return
end
y = x;
for i=1:n-1
  y = [y; x];
end
y1 = y;
for i=1:m-1
  y = [y y1];
end
