Generating bit stream with N samples per bit

I want to generate a bit stream in MATLAB, from the transmitter to pass by the channel
I use MATLAB function "randi" between 0 & 1, so it generates random vectors of 0s & 1s and connects them to produce triangles
I want to make N (e.g N=10) samples per bit, so each bit is produced contains 10 samples, so 1 will be a line not just a point and same as for 0
So, In receiver we works as samples and then take decisions then shifting to work on bits after the sampler (or slicer)
So, How can I do that

Réponses (1)

I'm not sure, what you are asking for. Maybe you mean:
x = randi([0,1], 1, 5)
x = 1×5
1 0 0 1 0
n = 3; % Easier to read here. Use 10 in your case.
y = repelem(x, 1, n)
y = 1×15
1 1 1 0 0 0 0 0 0 1 1 1 0 0 0

Catégories

En savoir plus sur Communications Toolbox dans Centre d'aide et File Exchange

Produits

Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by