Find index in matrix
2 ビュー (過去 30 日間)
古いコメントを表示
I have the next matrix:
A =
0 0 0
0 0 1
0 0 2
0 1 0
0 1 1
0 1 2
0 2 0
0 2 1
0 2 2
1 0 0
1 0 1
1 0 2
1 1 0
1 1 1
1 1 2
1 2 0
1 2 1
1 2 2
Is it possible to know the matrix index of a (x,y,z) value? For example (x,y,z) = (0,2,0) would be index=7:
A(7,:)= (0,2,0)
0 件のコメント
回答 (1 件)
the cyclist
2019 年 8 月 5 日
編集済み: the cyclist
2019 年 8 月 5 日
[tf,idx] = ismember([0 2 0],A,'rows')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!