matlabdigital-analog-converter

How do I write MATLAB code for a DAC converter ?


In the first step I generated a sequence of bits (0,1)..

I used a randi command x = randi([0 1],1,3) to generate random bits

I stuck with these 2 steps :

Divide sequence by 3 bits into 8 levels [000, 001, 010, 011, 100, 101, 110, 111]

For each quantum level assigns amplitude value from the range [-2, 2]


Solution

  • I won't provide the full source code to leave a bit of the homework for you, but I will give you some hints: