compare
5 ビュー (過去 30 日間)
古いコメントを表示
G=[1 0]with I={[1 0;1 1;0 0;1 0;1 1;0 1;1 0 random sequence]} i need to compare them and count number of matched bits
0 件のコメント
回答 (2 件)
the cyclist
2011 年 7 月 23 日
You can use the ismember() command, with the 'rows' option.
3 件のコメント
the cyclist
2011 年 7 月 23 日
Fangjun Jiang has kindly written the exact code you need. What's the problem?
Fangjun Jiang
2011 年 7 月 23 日
Probably there is no need to make I a cell array.
G=[1 0];
I=[1 0;1 1;0 0;1 0;1 1;0 1;1 0];
Compare=ismember(I,G,'rows');
Count=sum(Compare)
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!