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

15 ビュー (過去 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(:)'
lilly lord
lilly lord 2020 年 5 月 29 日
Thank u so much.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by