How can I make spreading code?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
DongShin Yang
el 21 de Mayo de 2015
Comentada: DongShin Yang
el 22 de Mayo de 2015
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 comentarios
Respuesta aceptada
Walter Roberson
el 21 de Mayo de 2015
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!