按行查找矩阵的坐标成员

时间:2016-06-17 10:20:15

标签: matlab matrix find coordinates rows

我有矩阵

public void beginConversation(){
    if (!conversation.isTransient()){
        conversation.end();
    }
    conversation.begin();
}

在这里,我想找到值为“8”的坐标。所以,应该有一个坐标,如:

A = 
    8 0 8 8 1
    0 6 8 1 1
    5 8 1 1 8

1 个答案:

答案 0 :(得分:2)

使用MATLAB的查找功能:

[row,col] = find(A==8);