Want to find a specific column of needed data
10 ビュー (過去 30 日間)
古いコメントを表示
I have a matrix of B= [ ]4*25 data bits, and i have another variable which consist of one of the column of B. How can i find specific column with its number?
e.g. B=[1 1 0 1; 1 1 1 0;..........0 1 1 1]; and i want to find S=[1 0 1 1] in B.
0 件のコメント
採用された回答
その他の回答 (2 件)
Meghana Dinesh
2015 年 11 月 18 日
編集済み: Meghana Dinesh
2015 年 11 月 18 日
Have you tried using ismember? I believe you can use a combination of MATLAB functions find and ismember.
find(ismember(M,X),dim)
1 件のコメント
Meghana Dinesh
2015 年 11 月 18 日
The "dim" should be columns. So you can take a transpose of your matrix.
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!