Im looking to create a matrix of rank k. The dimension of the matrix is m x n. The input k satisfies that condition that k < min(
k
m x n
k < min(
Well, a trivial method is to produce a matrix that looks like:
1 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0
i.e. k columns of the identity matrix, then repeat the last column n-k times (or m-k times, depending on orientation).