I have 1011 and i want to split it into 2 sets of 10 in one group and 11 in another. how to do it

댓글 수: 1

Walter Roberson
Walter Roberson 2017년 7월 10일
How is your 1011 represented? Is it '1011' -- that is, a char vector? Is it "1011" -- that is, a string object? Is it [1 0 1 1] -- that is, a numeric vector with one bit per position? Is it 1011 decimal, which is binary [0 0 0 0 0 0 1 1 1 1 1 1 0 0 1 1] ?

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

답변 (1개)

KSSV
KSSV 2017년 7월 10일

1 개 추천

N = '1011' ;
N1 = N(1:2) ;
N2 = N(3:4) ;

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

질문:

2017년 7월 10일

댓글:

2017년 7월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by