Bit Concatenate

3 Ansichten (letzte 30 Tage)
dmfwlansejr
dmfwlansejr am 13 Aug. 2021
Kommentiert: SK woo am 30 Dez. 2021
if r=[0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0];
then I wnat
r=0001001001001000 or '0001001001001000'
  1 Kommentar
SK woo
SK woo am 30 Dez. 2021
r = [0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0];
%
two = 2.^(15:-1:0)';
out = dec2bin(r * two, 16)
out = '0001001001001000'

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!