Borrar filtros
Borrar filtros

convert binary array to different set array

1 visualización (últimos 30 días)
Rick Giovanini
Rick Giovanini el 27 de En. de 2018
Respondida: Star Strider el 28 de En. de 2018
How could I convert something like
'111'
'010'
'101'
'111'
'110'
'110'
'101'
in a 7 by 3 array into the array of 7 bit elements
1110101
0111111
0110101

Respuestas (1)

Star Strider
Star Strider el 28 de En. de 2018
Try this:
C3 = ['111'
'010'
'101'
'111'
'110'
'110'
'101'];
C7 = reshape(C3', 7, [])';
C7 =
3×7 char array
'1110101'
'0111111'
'0110101'
Note the 2 transpose operators (') in the ‘C7’ assignment.

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by