How do I change the amplitude of a signal based on uniform random distribution? Not sure how to proceed.
2 次查看(过去 30 天)
显示 更早的评论
![](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 个评论
回答(1 个)
Priyanshu Mishra
2020-2-24
编辑:Priyanshu Mishra
2020-2-24
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PHY Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!