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

Respuestas (1)

Jan
Jan el 14 de Mzo. de 2022
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

Categorías

Más información sobre MATLAB Coder en Centro de ayuda y File Exchange.

Productos

Versión

R2016b

Preguntada:

el 14 de Mzo. de 2022

Respondida:

Jan
el 14 de Mzo. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by