MATLAB: How to repeat a bit sequence repeat a bit sequence Hi I have a key =1234;bit_sequence = dec2bin(key); how i create a new_bit_sequence longer by repeating bit_sequence n time? (n is interger, ex: n=50) Best Answer key =1234;bit_sequence = dec2bin(key)new_bit_sequence=repmat(bit_sequence,1,50) Related SolutionsMATLAB: How to encode a bit sequences with key nK = 17; %for example, length of keykey_sequence = round(rand(1,nK)); %example keynB = 50; %for example, length of bit sequencebit_sequence = round(rand(1,nB)); %example bitsnew_bits = zeros(1, nB);for J = 1 : nB new_bits(J) = xor( bit_sequence(J), key_sequence(mod(J-1, nK)+1) ); %xor with keyend MATLAB: How to convert a bit sequence to array a='10011010010'out=a-'0' Related QuestionFprintf repeatGenerate 50000 binary sequence of 16 bits long (without repetition) without using “rand(1,16) > 0.5” logicHow can i encrypt a colour image with a psuedo random sequenceHow to create a sequence.Repeat in counterHow to make a binary sequence bit with given key
Best Answer