How do I change the amplitude of a signal based on uniform random distribution? Not sure how to proceed.
1 view (last 30 days)
Show older comments
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/272865/image.png)
Please help me with the "A" signal and the switch. Not sure how to proceed.
0 Comments
Answers (1)
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".
0 Comments
See Also
Categories
Find more on PHY Components 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!