MATLAB: copy a specific portion of an array

前端 未结 2 657
梦如初夏
梦如初夏 2021-01-20 01:14

I am trying to copy a few elements from a matrix, but not a whole row, and not a single element.

For example, in the following matrix:

a = 1 2
    3          


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-20 01:54

    You are not "removing" the second column, you are referencing the other column.

    You should read some of the Matlab docs, they provide some help about the syntax for accessing portions of matrices:

    http://www.mathworks.com/help/techdoc/learn_matlab/f2-12841.html#f2-428

提交回复
热议问题