How to create a rank k matrix using MATLAB?

前端 未结 3 628
礼貌的吻别
礼貌的吻别 2021-01-21 18:01

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(

3条回答
  •  春和景丽
    2021-01-21 18:49

    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).

提交回复
热议问题