Digital Signal Processing Reference
In-Depth Information
(a) 2 samples
(b) 4 samples
(c) 8 samples
(d) 17.5 samples
(e) 3.75 samples
For each of (a) through (e), devise a call to generate and plot the real and imaginary parts of a
complex exponential having the respective stated period.
7. Using paper and pencil, convert the following decimal numbers to binary offset notation using
4 bits:
(a) 0; (b) 1; (c) 2; (d) 3; (e) 8; (f ) 9; (g) 15
8. Using paper and pencil, convert the following binary numbers (in offset format) to decimal
equivalent:
(a) [1001001]; (b) [10000001]; (c) [10101010]; (d) [11111111]
9. Write a script that implements the following function:
[OutputMat] = LVxDigitizePosNums(NumsToDig,NumBits)
in which OutputMat is a matrix of binary numbers, each row of which represents one number from the
input vector NumsToDig , which consists of zero or positive decimal numbers to be converted to binary
offset format, and NumBits is the minimum number of bits necessary to quantize all the decimal numbers
in NumsToDig without clipping.
function [OutputMat] = LVxDigitizePosNums(xNumsToDig,nBits)
% Receives a vector of positive decimal numbers to convert to
% binary notation using nBits number of bits, and produces
% as Output a matrix each row of which is a binary
% representation of the corresponding input decimal number.
% Test call:
% LVxDigitizePosNums([0,1,34,23,2,17,254,255,127],8)
The following steps need to be completed:
(a) From the input arguments, generate a power-of-two vector of appropriate length;
(b) Initialize OutputMat as a matrix of zeros having a number of rows equal to the length of vector
NumsToDig , and a number of columns equal to NumBits ;
(c) To conduct the actual successive approximation algorithm, all the values in one column of
OutputMat at a time are set to 1, and the following matrix equation is evaluated:
TestMat = OutputMat*xWtVec' - NumsToDig';
(d) The row indices must be found of entries in TestMat (which is a column vector) that are less
than zero, and the corresponding values in OutputMat are then reset from 1 to zero.
(e) The operation proceeds in this manner from column to column until all columns have been
experimentally set to 1, tested, and reset to zero as required. The final result is then the output of the
function, OutputMat .
10. Write a script that can receive decimal numbers from 0.00 up to 10.00 and convert them to
binary offset notation having 16 bits of precision, using the method of successive approximation. State
the value of the LSB.
Search WWH ::




Custom Search