MATLAB: 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

binary data generation

The data stream should be like this, A=[1 0 0 0 0 0 0 0 0 0]

Best Answer

If you want to be compatible with the MATLAB binary data representation convention, this works:
n = dec2bin(0, 10);
n(1) = '1';