Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

2 Ansichten (letzte 30 Tage)
Henry Buck
Henry Buck am 8 Sep. 2015
Geschlossen: Walter Roberson am 8 Sep. 2015
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.

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by