function asm = write2(a, b)
//
// Writes the matrices a and b adjacent to each other, separated by a line.
// a and b must have the same number of rows.
// -----------------------------------------------------------------------------
sizea = size(a);
n = sizea(1);
m1 = sizea(2);
sizeb = size(b);
m2 = sizeb(2);
for i = 1 : n
as = sprintf(' %7.3f', a(i, 1));
for j = 2 : m1
// as = strcat(as, sprintf(' %7.3f', a(i, j)));
as = as + sprintf(' %7.3f', a(i, j));
end
as = as + ' ||';
for j = 1 : m2
as = as + sprintf(' %7.3f', b(i, j));
end
if i == 1
asm = as;
else
asm = [asm; as];
end
end
endfunction