Find rows in matrix where entries match certain constraints?

后端 未结 1 1339
执念已碎
执念已碎 2021-01-21 11:11

I have a matrix in Matlab and want to find the indeces of all rows, where some of the columns meet a specific criteria.

Example

M =

 1     5            


        
相关标签:
1条回答
  • 2021-01-21 11:50
    R = (M(:,3) == 10 & M(:,4) == 14);
    

    should be sufficient.

    0 讨论(0)
提交回复
热议问题