フィルターのクリア

how to add bits in between the binary data

4 ビュー (過去 30 日間)
pramod kumar
pramod kumar 2013 年 6 月 18 日
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
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
Andrei Bobrov 2013 年 6 月 18 日
編集済み: Andrei Bobrov 2013 年 6 月 18 日
pramod kumar
pramod kumar 2013 年 6 月 18 日
thank you so much its helped me lot

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by