how to extract last 3 bits from binary string and then concatenate

조회 수: 13 (최근 30일)
lilly lord
lilly lord 2020년 5월 29일
댓글: lilly lord 2020년 5월 29일
Hi, i have an array which is converted into binary string. I want to extract last three bits and then arrange in an array
Y=[123 345 981 345 650]';
%Convert into binary
Y1=dec2bin(Y);
%%%%Out put is
'0001111011'
'0101011001'
'1111010101'
'0101011001'
'1010001010'

채택된 답변

KSSV
KSSV 2020년 5월 29일
iwant = Y1(:,8:10)
  댓글 수: 6
KSSV
KSSV 2020년 5월 29일
iwant = Y1(:,8:10)' ;
iwant = iwant(:)'

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by