Generating bit stream with N samples per bit
Show older comments
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
Answers (1)
I'm not sure, what you are asking for. Maybe you mean:
x = randi([0,1], 1, 5)
n = 3; % Easier to read here. Use 10 in your case.
y = repelem(x, 1, n)
Categories
Find more on MATLAB Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!