How can I make spreading code?

조회 수: 4 (최근 30일)
DongShin Yang
DongShin Yang 2015년 5월 21일
댓글: DongShin Yang 2015년 5월 22일
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?

채택된 답변

Walter Roberson
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.
  댓글 수: 1
DongShin Yang
DongShin Yang 2015년 5월 22일
Thanks you very much. I made the spread value.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by