How I can convert a binary number into Matrix

13 visualizaciones (últimos 30 días)
Abduellah Elbakoush
Abduellah Elbakoush el 20 de Dic. de 2021
Respondida: yanqi liu el 21 de Dic. de 2021
I have 100110101010
I want 10
01
10
10
10
10
  1 comentario
Stephen23
Stephen23 el 20 de Dic. de 2021
C = '100110101010'
C = '100110101010'
M = reshape(C,2,[]).'
M = 6×2 char array
'10' '01' '10' '10' '10' '10'

Iniciar sesión para comentar.

Respuesta aceptada

yanqi liu
yanqi liu el 21 de Dic. de 2021
yes,sir,if the data is logical type,may be use the follow process,or use Stephen method to reshape
a = logical([1 0 0 1 1 0 1 0 1 0 1 0])
a = 1×12 logical array
1 0 0 1 1 0 1 0 1 0 1 0
b = [a(1:2:end)' a(2:2:end)']
b = 6×2 logical array
1 0 0 1 1 0 1 0 1 0 1 0

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by