How to split numbers to A,B,C

How to split numbers to A,B,C , for 8 bits? example :
I generated : 10111001100000110011111 , (always 24 numbers,only 0,1) , command : x = randi([0 1],24,1)
and now i want to split these 24 nubers to A,B,C for 8 bits in every sequence (A,B,C). , I used command reshape(x,[8,3]) , but how to add "title" A,B,C?
Is here function/command ? i cant find it

1 件のコメント

Rik
Rik 2018 年 12 月 4 日
You might be looking for the table class

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

回答 (1 件)

KSSV
KSSV 2018 年 12 月 4 日
編集済み: KSSV 2018 年 12 月 4 日

0 投票

x = randi([0 1],24,1) ;
A = reshape(x,[8,3]) ;
YOu can call A,B,C by A(:,1), A(:,2), A(:,3)

3 件のコメント

Milos Kopec
Milos Kopec 2018 年 12 月 4 日
編集済み: Milos Kopec 2018 年 12 月 4 日
Sorry I dont understand, how to call please? how to write it?
edit : i understood, command window looks like :
x =
1
1
1
1
0
0
1
0
1
1
1
0
1
0
0
0
1
1
1
1
0
1
0
1
A =
1 1 1
1 1 1
1 1 1
1 0 1
0 1 0
0 0 1
1 0 0
0 0 1
ans =
1
1
1
1
0
0
1
0
ans =
1
1
1
0
1
0
0
0
ans =
1
1
1
1
0
1
0
1
>>
KSSV
KSSV 2018 年 12 月 4 日
編集済み: KSSV 2018 年 12 月 4 日
x = randi([0 1],24,1) ;
iwant = reshape(x,[8,3]) ;
A = iwant(:,1) ;
B = iwant(:,2) ;
C = iwant(:,3) ;
Milos Kopec
Milos Kopec 2018 年 12 月 4 日
Thank you so much

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

カテゴリ

ヘルプ センター および File ExchangeMATLAB Compiler についてさらに検索

タグ

質問済み:

2018 年 12 月 4 日

コメント済み:

2018 年 12 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by