How can I make spreading code?
5 ビュー (過去 30 日間)
古いコメントを表示
I studing "Bajwa et al.: Compressed Channel Sensing: A New Approach to Estimating Sparse Multipath Channels." I want to make matlab code about CCS 1 in the paper.
Pick the spreading code [xn]n=0:N0-1 associated with xtr(t) to be a sequence of independent and identically distributed(i.i.d) Rademacher variables taking values +1/sqrt(n0) or -1/sqrt(n0) with probability 1/2 each.
How can I make the spreading code?
0 件のコメント
採用された回答
Walter Roberson
2015 年 5 月 21 日
c = 1/sqrt(n0);
spread = (round(rand(1,N0))*2-1) * c;
rand() returns a value between 0 and 1. round() of it returns 0 half the time (the values below 0.5) and 1 half the time (the values above 0.5). To shift a value that is 0 or 1 to become -1 or +1, multiply the (0 or 1) by 2 to get (0 or 2), and subtract 1 to get (-1 or +1). Then multiply that by your basic value to get your spread value.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!