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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
nafila aytija
am 20 Mai 2016
Kommentiert: Star Strider
am 20 Mai 2016
The data stream should be like this, A=[1 0 0 0 0 0 0 0 0 0]
0 Kommentare
Akzeptierte Antwort
Star Strider
am 20 Mai 2016
If you want to be compatible with the MATLAB binary data representation convention, this works:
n = dec2bin(0, 10);
n(1) = '1';
2 Kommentare
Weitere Antworten (1)
Azzi Abdelmalek
am 20 Mai 2016
Bearbeitet: Azzi Abdelmalek
am 20 Mai 2016
A=[1 zeros(1,9)]
or
dec2bin(2^9,10)-'0'
0 Kommentare
Siehe auch
Kategorien
Mehr zu Logical 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!