How I can convert a binary number into Matrix

13 ビュー (過去 30 日間)
Abduellah Elbakoush
Abduellah Elbakoush 2021 年 12 月 20 日
回答済み: yanqi liu 2021 年 12 月 21 日
I have 100110101010
I want 10
01
10
10
10
10
  1 件のコメント
Stephen23
Stephen23 2021 年 12 月 20 日
C = '100110101010'
C = '100110101010'
M = reshape(C,2,[]).'
M = 6×2 char array
'10' '01' '10' '10' '10' '10'

サインインしてコメントする。

採用された回答

yanqi liu
yanqi liu 2021 年 12 月 21 日
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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by