フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to count column bits with the same weight in binary array ?

2 ビュー (過去 30 日間)
Henry Buck
Henry Buck 2015 年 9 月 8 日
閉鎖済み: Walter Roberson 2015 年 9 月 8 日
Hi, I have a binary array and I want to count the column with the same weight.
I want to do it with function...m-file For example:
the matrix is (row)X(col) = 7x20:
19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 0 1 0 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 0
Thanks, Henry
There is 6 col with the same weight (two 1 bits) - col=0,3,6,7,11,15. There is 8 col with the same weight (tree 1 bits)- col=1,9,10,12,13,14,17,18. There is 5 col with the same weight (four 1 bits) - col=2,4,5,16,19.

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by