How I can convert a binary number into Matrix

13 Ansichten (letzte 30 Tage)
Abduellah Elbakoush
Abduellah Elbakoush am 20 Dez. 2021
Beantwortet: yanqi liu am 21 Dez. 2021
I have 100110101010
I want 10
01
10
10
10
10
  1 Kommentar
Stephen23
Stephen23 am 20 Dez. 2021
C = '100110101010'
C = '100110101010'
M = reshape(C,2,[]).'
M = 6×2 char array
'10' '01' '10' '10' '10' '10'

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

yanqi liu
yanqi liu am 21 Dez. 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

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by