Hi,,is there anyone who could tell me,how to generate a 10 bit binary data with only ONE in the first position and rest is zero?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
nafila aytija
il 20 Mag 2016
Commentato: Star Strider
il 20 Mag 2016
The data stream should be like this, A=[1 0 0 0 0 0 0 0 0 0]
0 Commenti
Risposta accettata
Star Strider
il 20 Mag 2016
If you want to be compatible with the MATLAB binary data representation convention, this works:
n = dec2bin(0, 10);
n(1) = '1';
2 Commenti
Più risposte (1)
Azzi Abdelmalek
il 20 Mag 2016
Modificato: Azzi Abdelmalek
il 20 Mag 2016
A=[1 zeros(1,9)]
or
dec2bin(2^9,10)-'0'
0 Commenti
Vedere anche
Categorie
Scopri di più su Logical 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!