How to split numbers to A,B,C

조회 수: 1 (최근 30일)
Milos Kopec
Milos Kopec 2018년 12월 4일
댓글: Milos Kopec 2018년 12월 4일
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일
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
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Smoothing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by