Bit Concatenate

2 visualizzazioni (ultimi 30 giorni)
dmfwlansejr
dmfwlansejr il 13 Ago 2021
Commentato: SK woo il 30 Dic 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 Commento
SK woo
SK woo il 30 Dic 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'

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!