Divide := function(v,n)
	local m, F, b;

	if (NumberOfColumns(v) mod n) ne 0 then
		return "n doesn't divide the length of v";
	end if;
	
	m := NumberOfColumns(v) div n;
	F := Parent(v[1]);
	b := Matrix(F, n, m, []);
	for i in [1..n] do
		for j in [1..m] do
			b[i][j] := v[(i-1)*m + j];
		end for;
	end for;

	return b;
end function;