NRZ-4 and NRZ-8
Show older comments
How can I do a level 4 and level 8 nrz?
i have a terrible teacher and he ask for it.
5 Comments
Rick Rosson
on 10 Apr 2012
Please provide more details. What are you trying to do? Please be as specific as possible.
Acosta
on 15 Apr 2012
Rick Rosson
on 15 Apr 2012
What is a "mask level 4"? What do you mean when you say "do"?
Acosta
on 15 Apr 2012
Acosta
on 15 Apr 2012
Answers (4)
Rick Rosson
on 15 Apr 2012
>> doc bin2dec
>> doc stairs
2 Comments
Acosta
on 16 Apr 2012
Rick Rosson
on 16 Apr 2012
Hi Acosta, I am not going to do your homework assignment for you. If you want some help, you need to make an effort to figure it out for yourself. I have given you enough to get started. Please let me know what you have tried on your own, and what _specific_ questions you have.
Rick Rosson
on 16 Apr 2012
0 votes
Here is another hint:
Suppose you have a series of randomly generated symbols drawn from the set of integers { 0, 1, 2, 3 }, and you would like to map them to the integers { -3, -1, +1, and +3 }, what mathematical formula could you use to compute this mapping?
HTH.
Rick
2 Comments
Acosta
on 16 Apr 2012
Rick Rosson
on 16 Apr 2012
You did not answer the question that I asked. Please think about it.
Rick Rosson
on 16 Apr 2012
You need to convert numbers from a binary representation (base 2) to a decimal representation (base 10). That is why I suggested looking at the bin2dec function.
If you break up the binary string into blocks of 2 bits each, you can use the bin2dec function to convert them to integer-valued numbers, each of which is an element of the set { 0 1 2 3 }. For example:
b = '10';
x = bin2dec(b);
disp(x)
will return the value of x as 2.
Likewise, if you break the binary string into blocks of three bits each, you will end up with integers in the set 0 ... 7 inclusively.
Rick Rosson
on 16 Apr 2012
0 votes
Another function that may help is reshape.
Categories
Find more on Programming 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!