fork download
  1. x = ones(4,4);
  2. y = rand(4,4);
  3. z = zeros(size(x,1)+size(y,1),size(x,2));
  4. z(1:2:end,:) = x;
  5. z(2:2:end,:) = y;
  6. z
Success #stdin #stdout 0.19s 65080KB
stdin
Standard input is empty
stdout
z =

   1.000000   1.000000   1.000000   1.000000
   0.389348   0.320156   0.125702   0.015243
   1.000000   1.000000   1.000000   1.000000
   0.223243   0.774083   0.147908   0.107557
   1.000000   1.000000   1.000000   1.000000
   0.869117   0.815908   0.445111   0.932616
   1.000000   1.000000   1.000000   1.000000
   0.318075   0.292369   0.258308   0.814115