MATLAB Questions and Answers Part-15

1. We can find the mean value of a series (upto n) using _________
a) meanabs()
b) mean()
c) sumabs()
d) sum()/n

Answer: b
Explanation: The mean() command is an inbuilt command which can be used to compute the mean of n no. of values in a series. meanabs() will take the sum of absolute values in the series while sumabs() only computes the sum of absolute values in the series.

2. We can find the summation of an A.G.P. series using __________
a) sum()
b) symsum()
c) Depends on the series
d) Cannot be done

Answer: b
Explanation: If the A.G.P. series can be represented as a summation of a function, we can use the symsum() to find the summation of the series. This is why MATLAB is very versatile as we can use it to reduce the time taken to solve many kinds of mathematical calculations.

3. We need to define a function separately to find the factorial of a number.
a) True
b) False

Answer: b
Explanation: MATLAB offers the prod() function which may be used to find the factorial of a number. Hence, we don’t need to define a separate function to evaluate the factorial of a number.

4. The function to evaluate the following series is
12+22+32+42+52+…832
a) sqr()
b) sqrsum()
c) sumsqr()
d) sumsqr[]

Answer: c
Explanation: sumsqr() is the pre-defined function is MATLAB to evaluate such series where each element is squared. sumsqr[] is syntactically incorrect.

5. What is the output of the following code?
mean[1:10]
a) Syntactical Error
b) 4.5
c) 5.5
d) Parse Error

Answer: a
Explanation: The syntax of the mean function is mean(). Now, if we give a vector input, we can either define the vector previously or we can introduce the vector itself within []. But in the given code, we haven’t placed the vector within (). Hence the answer won’t be 5.5 but a syntactical error will be shown.

6. Butterworth and Low pass filters use _________
a) IIR and FIR Design
b) FIR and IIR Design
c) FIR Design
d) IIR Design

Answer: a
Explanation: Butterworth filters are made using the IIR Filter Design technique while Low Pass Filters are made using the FIR Design technique. Now, Butterworth low pass filters can be made using the IIR Design Technique. But the kind of low pass filters.

7.The result of the following code is
p=dtft([1,2,3],3)
a) Returns a 3-point D.T.F.T.
b) Returns a N-point D.T.F.T.
c) Returns a 3-point D.F.T.
d) Error

Answer: d
Explanation: There is no function called dtft. The command is fft which uses the fast Fourier Transform Algorithm and get the 3 point D.F.T. of the above matrix.

8. The above command will give
A=fft((1,2,3),2)
a) D,F,T after taking a truncated input
b) Yield a 2-point D.F.T.
c) Uses the Butterfly algorithm
d) Error

Answer: d
Explanation: The process of the fft() command includes the operations mentioned. The syntax, in this case, is wrong since the input vector is given in parentheses. The input vector has to be placed within [].

9. The fir1 command can be used to find _____________
a) High Pass Filters using IIR method
b) Low Pass Filters FIR method
c) Filters using Window Method
d) FIR filters using Window Method

Answer: d
Explanation: The fir1() command is a pre-defined command in MATLAB and it uses the Hamming Window method to obtain the Response of any FIR filter. Low Pass Filters FIR method would’ve been correct but FIR filters using Window Method is a more generalized answer.

10. The multiplication of two signal in time domain signifies _______
a) Convolution in time domain
b) Convolution in frequency (jw) domain
c) Multiplication in frequency (jw) domain
d) Nothing

Answer: c
Explanation: The fourier transform can be used to find the multiplication of two signals in time domain. The convolution of two signals in frequency domain is same as the multiplication of two signals in time domain.