Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

101.

The accuracy of quad() is ___________(a) very low(b) low(c) moderate(d) highI had been asked this question in exam.The query is from Integration in division Beyond the Basics of MATLAB

Answer» CORRECT CHOICE is (b) low

Explanation: The quad() function is pertinent for low accuracy problems. The QUADL() function is more useful for high accuracy problems.
102.

Clear will removes all graphs.(a) True(b) FalseThe question was posed to me in unit test.Origin of the question is Suppressing Output in section Beyond the Basics of MATLAB

Answer»

Correct CHOICE is (b) False

Easy explanation: Clear all REMOVES VARIABLES from the workspace. It does not remove graphs.

103.

We cannot find the integrator, made with an OP-amp, response using the quad() command at steady state.(a) True(b) FalseI had been asked this question in unit test.Origin of the question is Integration in section Beyond the Basics of MATLAB

Answer»

The correct choice is (a) True

Explanation: The integrator CIRCUIT integrates the input waveform within a given time limit. Hence, to find the response of the integrator, we can USE the quad() COMMAND since it COMPUTES definite integration only. But if we WANT to find the steady state response, we cannot do it using quad() since it does not compute for an infinite limit. Hence, we have to use the int() command.

104.

What is the attribute of sparse matrices?(a) sparse(b) double(c) vector(d) no attributeI have been asked this question in an interview for internship.Question is from Sparse Matrices topic in section Beyond the Basics of MATLAB

Answer» RIGHT option is (a) sparse

The explanation is: The ATTRIBUTE of a sparse matrix will be sparse while the class of the attribute is double, by DEFAULT. HENCE, sparse is correct.
105.

To find the absolute value of the sum of squares of numbers in a series, we use_________(a) abs(sumsqr())(b) sumsqr()(c) sumsqr(abs())(d) abs(sqrsum())I have been asked this question in unit test.I want to ask this question from Sums and Products in division Beyond the Basics of MATLAB

Answer»

Correct ANSWER is (a) abs(sumsqr())

For explanation: The command sumsqr () finds the SUM of squares of finite VARIABLES in a series. If we give sumsqr(abs()), it will convert all the values in the series to absolute values so we won’t GET the true sum of the series. sumsqr()will only give the sum of all the values in the series.

106.

We can generate the summation of a series, formed with a character, using ________(a) symsum(b) sum(c) symssum(d) intI got this question by my college director while I was bunking the class.Origin of the question is Sums and Products topic in chapter Beyond the Basics of MATLAB

Answer»

Right choice is (a) symsum

Easiest explanation: The in-built command to find the SUMMATION of a series generated due to a CHARACTER is symsum. SINCE our function USES symbolic characters, we NEED to express our function within the symsum command to get the summation.

107.

The nature of the eigen matrix displayed in MATLAB is ___________(a) Unsorted(b) Sorted(c) Sorted in Ascending order(d) Sorted in Descending orderI got this question in quiz.My question is based upon Linear Systems in portion Beyond the Basics of MATLAB

Answer»

Right option is (a) Unsorted

To elaborate: The eig(a,’matrix’) COMMAND will RETURN the EIGEN values of the matrix ‘a’ in a matrix form. But, it will give it in an unsorted manner- the elements will be PLACED on the PRINCIPAL diagonal. To sort them, we need to use the sort command- this will sort the columns in ascending order.

108.

Ordinary differential equations having initial values ____________(a) Can be solved(b) Cannot be solved(c) Can be modelled(d) Has a trivial solutionI have been asked this question in final exam.Question is taken from Differentiation in portion Beyond the Basics of MATLAB

Answer»

Correct choice is (c) Can be modelled

For explanation I WOULD SAY: We have 8 different Ordinary differential equations solvers in MATLAB. They take the initial values, if at all present, into account while solving the Differential equation of interest. Hence, systems which follow a differential equation can be modelled and OBSERVED using MATLAB.

109.

The default number of non-zero elements which can be put into the memory allocated by the spalloc command is > 1.(a) True(b) FalseThe question was posed to me during an interview.Origin of the question is Sparse Matrices in portion Beyond the Basics of MATLAB

Answer»

Right ANSWER is (B) False

To elaborate: EVEN only 1 element can be PUT into the memory which has been already allocated by the spalloc COMMAND. Hence, the above statement is false.

110.

A memory for sparse matrix is dedicated by the ______ command.(a) spalloc(b) sparsealloc(c) allocspar(d) no such commandThis question was addressed to me in my homework.My query is from Sparse Matrices topic in portion Beyond the Basics of MATLAB

Answer»

Correct choice is (a) spalloc

The best explanation: The spalloc COMMAND is used to allocate memory for a sparse MATRIX. The REST of the commands are INCORRECT.

111.

We can find the mean value of a series (upto n) using _________(a) meanabs()(b) mean()(c) sumabs()(d) sum()/nThe question was posed to me during an interview for a job.This interesting question is from Sums and Products topic in chapter Beyond the Basics of MATLAB

Answer»

Correct answer is (B) mean()

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.

112.

The non-zero elements in a sparse matrix are shown by the ______ command.(a) nzeros(b) nonzeros(c) notzeros(d) nozeroThis question was addressed to me during an interview.The question is from Sparse Matrices in portion Beyond the Basics of MATLAB

Answer»

The correct CHOICE is (b) nonzeros

The EXPLANATION: The non-zeros COMMAND is used to get the non-zero elements present in the sparse MATRIX. The rest of the OPTIONS are not defined in MATLAB.

113.

What is the default parameter for the ztrans() command?(a) z(b) w(c) s(d) no default parameterThis question was addressed to me by my college director while I was bunking the class.The question is from Default Variables topic in section Beyond the Basics of MATLAB

Answer»

The correct option is (a) Z

Best EXPLANATION: The default PARAMETER for the given COMMAND is z. This is a pre-defined command in MATLAB and uses the basic definition of the Z-transform to EVALUATE the result.

114.

There are 7 ODE solvers in MATLAB.(a) True(b) FalseI have been asked this question in a job interview.This intriguing question originated from Differentiation in division Beyond the Basics of MATLAB

Answer»

The CORRECT CHOICE is (b) False

Easy explanation: There are total 8 ODE solvers in MATLAB. They are INBUILT in MATLAB and each can be used for solving ODEs with initial values. They ALSO provide varying accuracy.

115.

For the existence of the n^th (n is varying from 1 to until the derivative is becoming 0) derivative of an equation, the equation should have __________(a) Initial values(b) At least one independent variable(c) At least one dependent variable(d) No such conditionThis question was posed to me in an interview for job.My enquiry is from Differentiation topic in chapter Beyond the Basics of MATLAB

Answer»

Correct answer is (b) At least ONE INDEPENDENT variable

For explanation: Derivatives are calculated with RESPECT to a CHANGE in an independent variable. Hence for deriving a derivative- the equation should have at least one independent variable so that we can FIND the derivative with respect to a change in that independent variable.

116.

In MATLAB, how can we check linearity of systems represented by transfer function?(a) Check waveforms after superpostion(b) Compare rank of matrices(c) Go for Rouche’s Theorem(d) IntuitionThis question was posed to me in class test.This interesting question is from Linear Systems in section Beyond the Basics of MATLAB

Answer»

The CORRECT choice is (a) Check waveforms after superpostion

Explanation: Since we have the transfer function of a system, we need to apply SUPERPOSITION and compare the waveforms GENERATED after applying the method of superposition. Rouche’s THEOREM is for a system of equations represented by matrices and it is the method of comparing ranks.

117.

What is a linear system?(a) A system which follows homogeneity and additivity(b) A system which follows additivity(c) A system which follows homogeneity(d) Almost every system is linearThis question was posed to me at a job interview.My question is from Linear Systems topic in division Beyond the Basics of MATLAB

Answer»

Right answer is (a) A system which follows homogeneity and additivity

Explanation: A system which follows homogeneity and additivity is CALLED linear system. This comes from the definition of superposition and here is the proof:

Taking a system with which PRODUCES Y1(t) as output for an INPUT x1(t) and an output y2(t) for an input x2(t),

HOMOGENITY: For input ax1(t), output should be ay1(t) and for input bx2(t), output should be by2(t).

ADDITIVITY: For a input of sum of x1(t) and x2(t), output should be the sum of a y1(t) and y2(t), i.e. the sum of individual response

Finally, if for an input of the sum of ax1(t) and bx2(t), if we GET the output as sum of ay1(t) and by2(t) the system is both homogeneous and additive. This is similar to the superposition principle. No the system is linear.

118.

What is the command which can be used to see the expressions within a user-defined function in MATLAB?(a) help(b) look for(c) echo on(d) cannot be seenThis question was addressed to me in quiz.My question is from Functions and Expressions topic in section Beyond the Basics of MATLAB

Answer»

The correct choice is (c) echo on

For EXPLANATION I WOULD say: A user-defined FUNCTION is a function file. The commands ‘HELP’ and ‘look for’ will only return the nature of in-built function. If the function file has ‘echo on’, it will display the expressions in the function file while executing.This is because function files, though they are different from script files, are inherently M-files.

119.

What are the minimum numbers of expressions which will be required to express a mathematical relation?(a) At least 1(b) At least 2(c) At most 1(d) Depends on the number of variablesThis question was addressed to me in an interview for internship.Question is from Functions and Expressions in section Beyond the Basics of MATLAB

Answer»

The correct choice is (d) Depends on the number of variables

Explanation: If we have a very big expression relating a VARIABLE y with any no. of variables x1,x2…xn we can put the entire expression on the right HAND side within a function and reduce the expression to

 y=func(x1,x2,x3…xn)

This CONTAINS two expressions only. The function, ‘func’, may contain a SET of 10000 statements. But we have simplified the expression to demonstrate a mathematical relation between y and all the other variables of the right-hand side, provided we are sure about the NATURE of the function ‘func’.

120.

The correct way of using the quad command while integrating an inline non-linear function is ___________(a) quad(‘[]’)(b) quad([‘’])(c) quad([])(d) quad(‘’)I had been asked this question in an online interview.Question is from Integration topic in portion Beyond the Basics of MATLAB

Answer»

Right answer is (a) QUAD(‘[]’)

Explanation: The inline function, being a non-linear function and saved as an inline class, will be given as a string argument to the quad() command. Due to its non-linear nature, it has to be PLACED like a MATRIX. quad(‘’) will only take the function but the function is non-linear so it will show an ERROR. quad([‘’]) is wrong because the ‘’ should COMPRISE the entire function, hence it should be outside []. quad([]) is syntactically wrong.

121.

How can we check whether the limn→3+ n-1 exists?(a) limit(n-1,n,3)(b) syms n;limit(n-1,n,3,’right’)(c) syms n;limit(n-1,3,’right’)(d) syms n;limit(n-1,3,n,’right’)This question was posed to me during an interview for a job.I want to ask this question from Limits topic in division Beyond the Basics of MATLAB

Answer»

Correct choice is (b) syms n;limit(n-1,n,3,’right’)

Easiest EXPLANATION: We have to GIVE our symbolic argument before our limit COMMAND. HENCE, syms n;limit(n-1,n,3,’right’) has the right order, and not syms n;limit(n-1,3,n,’right’). syms n;limit(n-1,n,3,’right’) is not same as limit(n-1,n,3) since there we are calculating the value of the function at the limiting value, 3, but we need to find it at the right-hand side of the limiting value- plus, limit(n-1,n,3) does not declare n as symbolic- this will give an error. syms n;limit(n-1,3,’right’) will give an error since the symbolic argument is not provided into the command.

122.

Butterworth and Low pass filters use _________(a) IIR and FIR Design(b) FIR and IIR Design(c) FIR Design(d) IIR DesignThe question was asked in an online quiz.This question is from Fourier Analysis and Filtering topic in section Beyond the Basics of MATLAB

Answer» CORRECT choice is (a) IIR and FIR DESIGN

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.
123.

The output of int(x^2,1,3) and quad(‘x. ^2,1,3) is ________(a) Same(b) Different(c) Maybe different(d) ErrorThe question was asked by my school principal while I was bunking the class.I'm obligated to ask this question of Integration topic in section Beyond the Basics of MATLAB

Answer»

Right option is (b) Different

Explanation: The output for int(x^2,1,3) will be 26/3. The output for quad(‘x. ^2’,1,3) is 8.6667. Hence we find that each output will be different. The int command will RETURN a fractional form while the quad command will return a decimal form up to 4 PLACES of decimal, ROUNDED up to the 4^th decimal place.

Output:

For int(x^2,1,3): 26/3

For quad(‘x. ^2’,1,3) : 8.6667

124.

Can we do Vector integration in MATLAB?(a) Yes(b) No(c) In some cases(d) Only single integralI have been asked this question in quiz.The above asked question is from Integration in chapter Beyond the Basics of MATLAB

Answer»

Correct option is (a) Yes

Easiest explanation: We can do vector integration in MATLAB. We simply NEED to integrate the co-efficient of the vector in a certain direction with respect to an independent VARIABLE. HENCEFORTH, we can do many applications of Vector Calculus.

125.

The int() function gives the __________(a) general solution of the ODE(b) general solution of the function(c) particular integral of a function(d) complementary functionThe question was posed to me in final exam.I'm obligated to ask this question of Integration topic in section Beyond the Basics of MATLAB

Answer» CORRECT choice is (c) particular integral of a function

The explanation: ODE solvers gives a general SOLUTION of an ODE. But the int() function will GIVE the particular integral of a function without any constant term.
126.

What is the starting index of an array in MATLAB?(a) 1(b) 0(c) Depends on the class of array(d) UnknownThis question was posed to me in an interview for internship.The origin of the question is Data Classes in division Beyond the Basics of MATLAB

Answer»

Right choice is (a) 1

To ELABORATE: Unlike C, the starting address of an array in MATLAB is 1. Hence if we declare an array named arr and TYPE arr(0), we will get an ERROR. The FIRST entry to the array will have the index 1.

127.

The pattern generated by the spy command is a measure of the number of zeros in the input matrix.(a) True(b) FalseI got this question during a job interview.The query is from Sparse Matrices topic in portion Beyond the Basics of MATLAB

Answer» CORRECT CHOICE is (B) False

To explain: It is actually a pattern of the NUMBER of non-zero elements in the input MATRIX. Hence, the above statement is false.
128.

The space located for the matrix generated from the spones command is _______(a) Same as a sparse matrix(b) Same as the original matrix(c) Same as an identity matrix(d) Double that of the sparse matrixThis question was posed to me by my college director while I was bunking the class.My question is from Sparse Matrices in chapter Beyond the Basics of MATLAB

Answer»

Correct ANSWER is (a) Same as a sparse MATRIX

To elaborate: The spones command also CREATES a sparse matrix. Hence, the NEWLY generated matrix will have the same size as that of a sparse matrix.

129.

The size of the sparse matrix will be ___ the original matrix.(a) equal(b) greater than(c) less than(d) not equal toThe question was posed to me in examination.The query is from Sparse Matrices in division Beyond the Basics of MATLAB

Answer» RIGHT option is (a) equal

Explanation: The sparse matrix stores the non-zero ELEMENTS in the sparse matrix. The space taken up by the sparse matrix being very LESS than the original, the SIZE of both the matrix will be same. Hence, only option equal is correct.
130.

The fftfilt command filters data based on ____________(a) Convolution(b) Overlap save method(c) No such command(d) Overlap add methodThe question was posed to me during an interview.This intriguing question comes from Fourier Analysis and Filtering topic in chapter Beyond the Basics of MATLAB

Answer»

Correct option is (d) Overlap add METHOD

To explain I would say: The overlap add method is used by the fftfilt command to generate the filtered sequence. This command is only ALLOWED for FIR FILTERS.

131.

The blackmann(N) command returns a ___________(a) N-point periodic blackmann window(b) N+1-point periodic blackmann window(c) N+1-point periodic blackmann window(d) N-point symmetric blackmann windowThis question was posed to me in final exam.Asked question is from Fourier Analysis and Filtering in section Beyond the Basics of MATLAB

Answer»

Right answer is (d) N-point symmetric blackmann window

The best I can EXPLAIN: 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.

132.

If the result of our summation is Infinity, what will MATLAB show?(a) Infinity(b) Nan(c) Inf(d) ErrorThis question was posed to me in an online quiz.I'd like to ask this question from Sums and Products topic in division Beyond the Basics of MATLAB

Answer»

Correct CHOICE is (C) Inf

For explanation: The sum function is INBUILT in MATLAB. It has been developed so that if the summation of our given series becomes INFINITE, it will return a Inf as an output.

133.

An example of a function whose derivative (any order) with respect to x is never 0, in MATLAB, is _______(a) sin(x)(b) x^n(c) e^x(d) does not existThis question was addressed to me by my school principal while I was bunking the class.My doubt is from Differentiation topic in section Beyond the Basics of MATLAB

Answer»

Right answer is (d) does not exist

The best explanation: It is not POSSIBLE that the derivative of a FUNCTION can never be 0. This is because there will always be a case where the derivative of the function becomes 0 for a certain value of X. This value of x can be real or imaginary.

134.

Negative limiting values cannot be applied to logarithmic functions in MATLAB.(a) True(b) FalseThis question was posed to me in homework.The origin of the question is Limits in portion Beyond the Basics of MATLAB

Answer»

Correct choice is (B) False

To elaborate: If we give NEGATIVE limiting values to logarithmic functions, they will return imaginary numbers. These can be treated as SOLUTIONS to such problems. MATLAB is a very powerful COMPUTING TOOL that can be used to solve such problems.

135.

If a function is differentiable, the function is continuous.(a) True(b) FalseThe question was asked during a job interview.This interesting question is from Limits in division Beyond the Basics of MATLAB

Answer»

The CORRECT choice is (a) True

Easy explanation: If a function is differentiable, it should be continuous in the DOMAIN where it is differentiable. This is because if the function is not continuous, within a range, it cannot be differentiated within that range.

136.

The modulus of z, z conjugate and -z are not equal in MATLAB.(a) True(b) FalseThis question was addressed to me in a job interview.This key question is from Complex Arithmetic topic in portion Beyond the Basics of MATLAB

Answer»

Correct option is (b) False

Best explanation: The MODULUS of z, z conjugate and -z are EQUAL. The MAGNITUDE of the modulus is ALWAYS a positive number. It is independent of the positive or negative NATURE of the real and imaginary parts of the complex number.

137.

To delete one variable but not the entire workspace, we need to mention the variable name after the clear command.(a) True(b) FalseThis question was posed to me by my college professor while I was bunking the class.The question is from Suppressing Output topic in division Beyond the Basics of MATLAB

Answer»

Correct CHOICE is (a) True

To explain I would say: The CLEAR command removes EVERY VARIABLE from the workspace. If we only mention the variable name, it will delete only that variable from the workspace and not the ENTIRE workspace will be cleared.