More methods on matrix generate.