plotting binary data to NRZ signal Format
13 views (last 30 days)
Show older comments
khoirul wakiah nasution
on 2 Jun 2017
Commented: namita kathpal
on 8 Aug 2018
i have a program like below :
a=dec2bin(n,8) . n is random input from 0 to 255. then i want to plot the result of 'a' into NRZ signal format. anyone can help me?
0 Comments
Accepted Answer
Walter Roberson
on 2 Jun 2017
https://www.mathworks.com/matlabcentral/fileexchange/41320-line-coding--manchester--unipolar-and-polar-rz--unipolar-nrz File Exchange contribution
bits = reshape( (dec2bin(n,8) - '0').', 1, [] );
encoded_bits = unrz(bits)
Now you can plot the encoded bits
4 Comments
namita kathpal
on 8 Aug 2018
I am running this code and it is showing undefined function or variable unrz. Kindly help me in this regard.
More Answers (0)
See Also
Categories
Find more on Logical 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!