MATLAB Questions and Answers Part-16

1. The window function is used to __________
a) multiply it with the incoming signal
b) add it with the incoming signal
c) subtract it from the incoming signal
d) divide the incoming signal

Answer: a
Explanation: The rectangular window function is multiplied with the incoming signal so that the unrequired components can be filtered out from the signal. This is the basic principle of filtering.

2. The output of the following codes are
i fft([1,2],2,2)
ii. fft([1,2],2)
a) same
b) different
c) I will give error
d) ii wil give error

Answer: a
Explanation: The result of i is a 2 point DFT of the input vector but it treats the input vector as a matrix and returns the DFT of the elements of the matrix row-wise. Hence, there is only one row which is the vector itself. Hence, the results of both codes will be same.

3. The butter() command takes in ________
a) Stopband attenuation
b) Order of the filter
c) Ripple frequency
d) Nothing

Answer: b
Explanation: The butter command is used to generate the filter co-efficient of a Butterworth filter. This is done by giving the order of the filter and the cut-off frequency as input to the butter filter. The ripple frequency and the stopband attenuation is given to the buttord() function.

4. The blackmann(N) command returns a ___________
a) N-point periodic blackmann window
b) N+1-point aperiodic blackmann window
c) N+1-point periodic blackmann window
d) N-point symmetric blackmann window

Answer: d
Explanation: Unless mentioned, the default type of blackmann window generated by the blackmann() command is a symmetric one. It is an N-point symmetric blackmann window and hence the rest of the options are incorrect.

5. The result of the following command is
hamming[32]
a) Error
b) A 32 point symmetric Hamming Window
c) A 33 point periodic Hamming Window
d) A 33 point Hamming Window

Answer: a
Explanation: There is syntactical error in this code. The input to the hamming command has to be within a pair of parentheses. Hence, the above code will give an error.

6. fft2 returns _________
a) a 2-d matrix
b) a 2-d D.F.T
c) a vector
d) No such command

Answer: a
Explanation: fft2 will return a 2-D D.F.T. of the vector given as an input to the command. It won’t give a 2-d matrix but a vector only.

7. What is the function of the unwarp command?
a) Generate smoother phase plots
b) Generate smoother gain plots
c) Generate smoother root locus
d) No such command

Answer: a
Explanation: The functioning of the unwrap command is based on the tolerance limit, ‘pi’, which is used to multiply the input vector with 2*pi so that it can return values for a smoother phase plot. Hence, Generate smoother phase plots is correct.

8. The default tolerance of the unwarp() function is ________
a) pi
b) 2*pi
c) pi/2
d) 0

Answer: a
Explanation: The default tolerance value for which the unwarp function changes the elements of the input vector is pi. It can be changed by mentioning the tolerance value separately in the command.

9. The hamming command returns a ___________
a) matrix
b) row vector
c) column vector
d) no such command

Answer: c
Explanation: The hamming code returns the L point hamming window as a column vector. Hence, column vector is correct.

10. What is the value of N while creating a 27 point Hamming window?
a) 28
b) 26
c) 14
d) 13

Answer: b
Explanation: An L-point window is created with L=N+1. Hence, for a 27 point window, the value of N is 26. The rest of the options are incorrect.