How extract a specific digit from binary number

4 ビュー (過去 30 日間)
Furat Alobaidy
Furat Alobaidy 2019 年 9 月 6 日
コメント済み: Furat Alobaidy 2019 年 9 月 6 日
Hi ,
i have this code in binary form : start from left (b=12) to right (b=1)
" 1 1 1 1 0 0 1 0 0 0 0 0 "
i need extract the digits under the lines only with same arrange such as : (1 1 0 0)
please how can do that? i used the following code but gave me error !
{Error using bitget
Inputs must be numeric}.
b= '111100100000'
bitpattern = bitget(bin1, 7:10 )

回答 (1 件)

Bruno Luong
Bruno Luong 2019 年 9 月 6 日
b(end-flip(7:10)+1)
  1 件のコメント
Furat Alobaidy
Furat Alobaidy 2019 年 9 月 6 日
thanks , i appreciate for your helping

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

カテゴリ

Help Center および File ExchangeEntering Commands についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by