Remove a column from a matrix in GNU Octave

前端 未结 4 706
深忆病人
深忆病人 2021-02-02 05:45

In GNU Octave, I want to be able to remove specific columns from a matrix. In the interest of generality. I also want to be able to remove specific rows from a matrix.

4条回答
  •  太阳男子
    2021-02-02 06:11

    The reverse method of doing this:

    columns_you_want_to_keep = [1, 3, 5]
    new_matrix = my_matrix(:,columns_you_want_to_keep)
    

提交回复
热议问题