how to add bits in between the binary data
显示 更早的评论
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).................]
回答(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 个评论
Andrei Bobrov
2013-6-18
comment by pramod kumar
thank you
if PN1=<255x1 double> so i am getting this error ??? Error using ==> mtimes Inner matrix dimensions must agree.
Error in ==> repof at 30 out = reshape(ones(250,1)*PN1,1,[]);
Andrei Bobrov
2013-6-18
See my answer, corrected.
pramod kumar
2013-6-18
Andrei Bobrov
2013-6-18
编辑:Andrei Bobrov
2013-6-18

pramod kumar
2013-6-18
类别
在 帮助中心 和 File Exchange 中查找有关 Standard File Formats 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!