Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

2 visualizaciones (últimos 30 días)
Henry Buck
Henry Buck el 8 de Sept. de 2015
Cerrada: Walter Roberson el 8 de Sept. de 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.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by