How do I change the amplitude of a signal based on uniform random distribution? Not sure how to proceed.

10 views (last 30 days)
Please help me with the "A" signal and the switch. Not sure how to proceed.

Answers (1)

Priyanshu Mishra
Priyanshu Mishra on 24 Feb 2020
Edited: Priyanshu Mishra on 24 Feb 2020
Hi Prashant,
In your question, transmitter output is two level NRZ signal. For generating the data bits based on uniform random distribution, you may use the follwing command:
bits = (randi([0 1],1,100)).'
The above command will generate the bit sequence of 1s and 0s with random distribution of equal probabilty of 1 and 0.
To convert these data bits into NRZ line coding please refer to the following file exchange :
This file contains a function unrz which is for unipolar NRZ signal. For your question you can modify the code. Under else condition, assign the x value as -1.
The above submission is one of the several submissions in MATLAB File Exchange on MATLAB Central which is a forum for our product users to interact, exchange information and knowledge, without MathWorks' involvement. Feel free to contact the author of this submission directly for specific questions about the implementation".

Community Treasure Hunt

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

Start Hunting!