Mapping pixels of two matrices

前端 未结 2 639
无人共我
无人共我 2021-01-28 21:12

Say that I have two matrices of the following sizes:

matrix_1 = 30090x2

matrix_2 = 170x177

Assume here that the number of rows n

2条回答
  •  一向
    一向 (楼主)
    2021-01-28 21:37

    Here is an option

      matrix_1 = matrix_2(:);
    

    which copies the elements (all of them) of matrix_2 in one long column.

    In your data you said that matrix_1 has two columns, you can add a further empty column by doing, for instance

      matrix_1  = [matrix_1 zeros(size(matrix_1))];
    

提交回复
热议问题