how to add bits in between the binary data
조회 수: 4 (최근 30일)
이전 댓글 표시
P=[1 0 1 1 0 1 0 0 1 1] i need to add bits in between 250 bits in between. can some one suggest me a logic how to read each bit and then add 250 same bits and then read next bit add 250 bit my final dat should be like this p1=[1 ....(250 one ) then 0------(250 zeros) then 1.......(250 one).................]
댓글 수: 0
답변 (1개)
Andrei Bobrov
2013년 6월 18일
편집: Andrei Bobrov
2013년 6월 18일
out = reshape(ones(251,1)*P(:)',1,[]);
or
out = kron(P(:)',ones(1,251));
댓글 수: 5
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!