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.

51.

The default tolerance of the unwarp() function is ________(a) pi(b) 2*pi(c) pi/2(d) 0I have been asked this question in an internship interview.My query is from Fourier Analysis and Filtering in section Beyond the Basics of MATLAB

Answer»

The CORRECT choice is (a) pi

To elaborate: 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.

52.

We need to define a function separately to find the factorial of a number.(a) True(b) FalseThe question was posed to me in quiz.The question is from Sums and Products in division Beyond the Basics of MATLAB

Answer» CORRECT answer is (b) False

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

The result of cumsum([1,2,3]) and sum([3,3]) are ____________(a) Same(b) Different(c) Absolute numbers(d) Signed numbersThe question was posed to me in an online interview.I want to ask this question from Sums and Products in chapter Beyond the Basics of MATLAB

Answer»

Right option is (b) Different

The best I can explain: The result of cumsum([1 2 3]) is 1,3,6 i.e the result is a row vector having output after ADDING up each element CUMULATIVELY while the result of sum([3 3]) is only 6. Hence, the two ANSWERS are different.

54.

We cannot calculate continuity at infinity in MATLAB.(a) True(b) FalseI have been asked this question during an online exam.This is a very interesting question from Limits topic in portion Beyond the Basics of MATLAB

Answer» RIGHT choice is (b) False

For explanation: We can calculate the continuity of a function at infinity. If the function is CONTINUOUS, we will get a result after USING the LIMIT() command. Else MATLAB will give Inf as a result.
55.

To do double limits, we can use __________(a) limit(limit())(b) limit( multiple inputs)(c) cannot be done in MATLAB(d) lim()This question was posed to me in homework.My query is from Limits in section Beyond the Basics of MATLAB

Answer» CORRECT choice is (a) limit(limit())

Best EXPLANATION: DOUBLE limits can be done in MATLAB. This can be done by placing limits WITHIN limits as in option limit(limit()). We cannot give multiple arguments within one LIM() command. There is no command called lim() in MATLAB.
56.

Can we check the continuity of a function in MATLAB?(a) Yes(b) No(c) Sometimes(d) RarelyI have been asked this question in semester exam.Origin of the question is Limits topic in section Beyond the Basics of MATLAB

Answer»

Correct option is (a) Yes

Explanation: With the help of the limit function, we can CHECK the left-hand limit and right-hand limit for a function approaching a LIMITING VALUE. We can ALSO check the value of the function at the limiting value. THUS, we can check the continuity of a function at the limiting value.

57.

___________ will give a hint that the file is closed.(a) Fopen(b) Fclose(c) Gclose(d) clcI got this question in an online quiz.Question is taken from Suppressing Output in division Beyond the Basics of MATLAB

Answer»

Right CHOICE is (B) Fclose

For explanation I would SAY: The Fclose command will close the file and returns an INTEGER value to the monitor screen to signify the operation of the command. If it returns 1, the file is closed.

58.

Double integration of a function can be done by using the _____ command.(a) int(int(func))(b) int(‘int(‘func’)’)(c) quad(int(func))(d) cannot be doneI got this question in an interview for job.The origin of the question is Integration topic in portion Beyond the Basics of MATLAB

Answer»

Right choice is (a) INT(int(func))

For explanation I would SAY: A function, as an input to the quad() command, should be WITHIN a string argument. The int() command cannot take string arguments. Hence, we can use the command int(int(func)) to find the double integral of a function.

59.

The function, as an input to the quad command, is given as _______________(a) Symbolic argument(b) String argument(c) Double argument(d) Rational argumentI got this question in an internship interview.My doubt is from Integration topic in section Beyond the Basics of MATLAB

Answer»

Correct option is (b) String argument

The best I can explain: The in-built operation of the quad COMMAND demands the function to be given input as a string argument. We have to write it within a pair of SINGLE INVERTED commas. We can use the symbolic argument for the int() function while finding the definite or an INDEFINITE INTEGRATION.

60.

clc in a function will clear the function.(a) True(b) FalseI got this question in an interview for internship.My query is from Suppressing Output in section Beyond the Basics of MATLAB

Answer» CORRECT choice is (b) False

The EXPLANATION is: Suppose we have the CLC command at the end of an M-file. The purpose of clc command is to CLEAR the command WINDOW. So when we call the function, it will clear the command window but the function will not be cleared.
61.

The sum() command cannot do ____________(a) Infinite summation(b) Numeric summation(c) Long summation(d) signed summationI got this question in an interview for job.My doubt stems from Sums and Products in division Beyond the Basics of MATLAB

Answer»

Correct CHOICE is (a) Infinite SUMMATION

Explanation: The sum command always takes the total set of numbers to ADD. Since we cannot define a vector which EXTENDS up to Infinity, the sum() command cannot perform Infinite summation.

62.

To represent only two digits after the decimal point, the format we use is ______(a) Long e(b) Short(c) Hex(d) BankThis question was addressed to me in examination.Origin of the question is Data Classes topic in chapter Beyond the Basics of MATLAB

Answer»

The correct ANSWER is (d) Bank

The best EXPLANATION: The Long e format is used to represent a TOTAL of 15 digits while short is used to represent 4 digits after decimal. The formal Hex is used for the hexadecimal representation of bits. The bank format is ALSO called ‘Dollars and Cents’. It is used to display only two digits after the decimal.

63.

The ode 23 solver is for higher accuracy.(a) True(b) FalseThe question was posed to me in exam.Question is taken from Differentiation topic in division Beyond the Basics of MATLAB

Answer»

The correct choice is (b) False

The EXPLANATION is: The ode23 solver is INBUILT in MATLAB. It is a two to three order Runga-Kutta METHOD solver and it is used for problems requiring LOWER accuracy.

64.

All data types are converted to ____ before mathematical operations.(a) Single(b) Double precision(c) Floating(d) UnsignedI have been asked this question in exam.My query is from Data Classes topic in division Beyond the Basics of MATLAB

Answer»

Right ANSWER is (B) Double PRECISION

Best explanation: All mathematical OPERATIONS are done with double precision in MATLAB. Hence, all data types, single and floating, are converted to double data types.

65.

The bilinear command returns column vectors.(a) True(b) FalseThe question was asked in my homework.The above asked question is from Fourier Analysis and Filtering topic in section Beyond the Basics of MATLAB

Answer»

Correct answer is (B) False

The best I can explain: The bilinear command RETURNS ROW vectors. They comprise of descending powers of z of the numerator and DENOMINATOR polynomial.

66.

The spy command takes in multiple matrices.(a) True(b) FalseI had been asked this question in class test.The question is from Sparse Matrices topic in chapter Beyond the Basics of MATLAB

Answer»

Correct answer is (B) False

The best I can explain: The spy command does not TAKE in multiple INPUTS. It will show the sparsity pattern of only input vector.

67.

The ellipord command is used for _________(a) FIR Filter design(b) IIR Filter design(c) Both IIR and FIR filter design(d) No such commandThis question was addressed to me in my homework.This intriguing question comes from Fourier Analysis and Filtering in division Beyond the Basics of MATLAB

Answer»

Correct option is (B) IIR Filter design

Best explanation: The ellipord COMMAND is used to GENERATE the minimum ORDER of a filter based on certain design specifications. The specifications include cut-off frequencies, passband ripple and the attenuation factor.

68.

We can find the summation of an A.G.P. series using __________(a) sum()(b) symsum()(c) Depends on the series(d) Cannot be doneThe question was asked in exam.My doubt is from Sums and Products in division Beyond the Basics of MATLAB

Answer»

Correct option is (b) symsum()

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

69.

fft2 returns _________(a) a 2-d matrix(b) a 2-d D.F.T(c) a vector(d) No such commandI had been asked this question during an interview.This intriguing question comes from Fourier Analysis and Filtering in section Beyond the Basics of MATLAB

Answer»

Right option is (a) a 2-d MATRIX

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

70.

What is the code to solve limx→1(logx)^logx?(a) syms x;limit(‘log(x)^(log(x))’,x,1)(b) limit(‘log(x)^(log(x))’,x,1)(c) syms x;limit(log(x)^(log(x)),x,1)(d) Cannot be solvedThe question was asked at a job interview.My question is based upon Limits topic in chapter Beyond the Basics of MATLAB

Answer» RIGHT option is (c) syms x;limit(LOG(x)^(log(x)),x,1)

To elaborate: We should not give the function as an input to the limit command as a string. It will generate a warning but GIVES an output.We have to DECLARE our variables as symbolic before placing our function as an argument to the limit command.
71.

The int function returns a constant of integration for indefinite integration.(a) True(b) FalseThis question was posed to me in final exam.This is a very interesting question from Integration topic in chapter Beyond the Basics of MATLAB

Answer» RIGHT option is (B) False

Explanation: The INT function does not return a constant of integration after doing indefinite integration. It will only show the particular integral after INTEGRATING the input function.
72.

The ode45 takes the function as ___________(a) Simple input argument(b) String argument(c) Input argument(d) Function argumentThe question was posed to me in an international level competition.This interesting question is from Differentiation topic in portion Beyond the Basics of MATLAB

Answer»

The correct choice is (b) String ARGUMENT

Best explanation: The SYNTAX of the ode45 solver is inbuilt in MATLAB. It takes the function as a string argument. The diff() command takes the function as a SIMPLE input argument.

73.

To check the rank of a non-singular square matrix, we have to use ___________(a) not required(b) rankm()(c) rankmatr()(d) rank()This question was posed to me in final exam.This interesting question is from Linear Systems in section Beyond the Basics of MATLAB

Answer»

Right answer is (d) rank()

To explain: Since the matrix is non-singular, the rank is the highest number of rows or columns (both are the same for a square matrix. Since we know the matrix is non-singular, we don’t have to use any command. We can DIRECTLY say the rank is EQUAL to the order of the matrix. If the matrix is not singular, we will have to use rank() to GET a value of the rank.

74.

A second order system with no initial condition is always linear.(a) True(b) FalseThis question was posed to me during an online interview.This interesting question is from Linear Systems topic in division Beyond the Basics of MATLAB

Answer»

The CORRECT choice is (a) True

Explanation: The superposition THEOREM will yield the nature of linearity of a system. For a system defined by an n-th order DIFFERENTIAL equation, if there are no initial conditions- the system will ALWAYS be linear.

75.

The command to find the eigen vector of a matrix in matrix form is _____________(a) eig(a,matrix)(b) eig(a,’matrix’)(c) eigen(a,matr)(d) eig(a)The question was posed to me in an interview.My question is from Linear Systems in chapter Beyond the Basics of MATLAB

Answer»

Right ANSWER is (b) eig(a,’matrix’)

Easy explanation: The in-built FUNCTION to find the eigen values of any matrix in MATLAB is eig(a). But, to display the result in matrix FORM- we use eig(a,’matrix’). This NATURE of the eig command is in-built in MATLAB.

76.

What are mathematical expressions?(a) Any mathematical relation(b) Any mathematical operation(c) Any mathematical conversation(d) Any mathematical functionI have been asked this question by my school principal while I was bunking the class.My doubt is from Functions and Expressions topic in portion Beyond the Basics of MATLAB

Answer»

Correct answer is (b) Any mathematical operation

The BEST I can explain: A mathematical FUNCTION is used to relate a dependent variable with an independent variable so it is used to operate on the independent variable. Similarly, any mathematical relation is used to relate an independent variable with a dependent variable. This is ALSO an operation SINCE based on the value of the independent variable, we comment on the value of the dependent variable. Hence a mathematical EXPRESSION is simply any mathematical operation.

77.

Graphs are not suppressed by the ‘;’.(a) True(b) FalseThis question was posed to me in final exam.Enquiry is from Suppressing Output topic in division Beyond the Basics of MATLAB

Answer»

Correct option is (B) False

The BEST EXPLANATION: The commands to generate any kind of graph will ALWAYS result in an OPENING of a new window when they are used as required. The ‘;‘ won’t suppress it.

78.

The butter() command takes in ________(a) Stopband attenuation(b) Order of the filter(c) Ripple frequency(d) NothingI had been asked this question at a job interview.This interesting question is from Fourier Analysis and Filtering in chapter Beyond the Basics of MATLAB

Answer»

Right choice is (b) Order of the FILTER

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

79.

What is the default return type of the rand command?(a) Single(b) Double(c) Signed(d) UnsignedThe question was posed to me in an online quiz.The above asked question is from Random Number Generation topic in section Beyond the Basics of MATLAB

Answer»

The CORRECT ANSWER is (b) Double

To elaborate: The default RETURN type of the rand command is double. It can be changed to single by GIVING single as a string input to the rand command.

80.

What is the class of the result of quadl() command?(a) double(b) short(c) long(d) symbolicThe question was asked during an online exam.Query is from Integration topic in chapter Beyond the Basics of MATLAB

Answer»

The correct option is (a) double

The BEST I can explain: The class of the result of quadl() COMMAND is double since it computes definite integrals only. We WOULD get the result as SYMBOLIC if we COMPUTE indefinite integration using the int command.

81.

What is the nature of ode45 solver?(a) 2^nd ordered R-K solver(b) 4^th ordered R-K solver(c) 1^st order R-K solver(d) Adams solverThe question was posed to me by my college professor while I was bunking the class.I'd like to ask this question from Differentiation topic in division Beyond the Basics of MATLAB

Answer» CORRECT option is (b) 4^th ordered R-K SOLVER

For EXPLANATION I would say: The ode45 solver is an ORDINARY Differential EQUATION solver in MATLAB which is used to solve a differential equation using the Runga-Kutta or R-K method upto 4^th order. This is an inbuilt ODE solver in MATLAB.
82.

The output for diff(p^2,q) is _______(a) 0(b) 2*p(c) 2 dp/dq(d) ErrorI had been asked this question during a job interview.My question comes from Differentiation topic in chapter Beyond the Basics of MATLAB

Answer»

Correct option is (a) 0

The explanation: We are differentiating the function ‘p^2’ with respect to q. Hence the VALUE will be 0. The 2^nd argument in the DIFF() command is the VARIABLE, with respect to which- we differentiate our function.

Output: 2*

83.

Which command is used to find the argument of a complex number?(a) atan2()(b) args()(c) abs()(d) cannot be determinedThis question was addressed to me during an interview for a job.The query is from Complex Arithmetic in portion Beyond the Basics of MATLAB

Answer»

Correct choice is (a) atan2()

Explanation: The argument of a complex number is only the ANGLE which satisfies the cartesian equations USED to represent the REAL and imaginary part of the complex number. Thus atan2() is the in-built function to find the angle or the argument, in MATLAB. ABS()is used to find the modulus of the complex number. args() is not a valid function in MATLAB.

84.

Strings are stored in ____ variables.(a) Character(b) String(c) Stack(d) ArrayThis question was addressed to me in exam.My doubt stems from Data Classes topic in section Beyond the Basics of MATLAB

Answer»

Right answer is (a) Character

To explain I WOULD say: All the variables are stored in the FORM of arrays. So STRINGS are ALSO stored as character variables. The variables are not CALLED string variables.

85.

What is the command used to generate a sparse normally generated matrix?(a) sparserndn(b) sprandom(c) sprandn(d) no such commandI have been asked this question in an interview.My question is from Sparse Matrices in portion Beyond the Basics of MATLAB

Answer»

Correct choice is (c) sprandn

The BEST I can explain: The sprandn command USES the same random number GENERATOR as that of the randn command. The rest of the commands don’t EXIST.

86.

To check whether the input matrix is sparse or not, we use the ________ command.(a) issparse(b) besparse(c) ifsparse(d) sparseThe question was asked by my school teacher while I was bunking the class.Question is taken from Sparse Matrices in portion Beyond the Basics of MATLAB

Answer» RIGHT choice is (a) issparse

For explanation: The correct COMMAND to CHECK whether the input MATRIX is sparse or not is the issparse command. The sparse command GENERATES a sparse matrix.
87.

The rand command is provided by the __________(a) Parallel Computing Toolbox(b) Signal Processing Toolbox(c) Symbolic Math Toolbox(d) Does not existI got this question in an internship interview.This interesting question is from Random Number Generation in portion Beyond the Basics of MATLAB

Answer»

The correct choice is (a) Parallel Computing Toolbox

To EXPLAIN I would SAY: The parallel Computing Toolbox CONTAINS the RAND command in MATLAB. The rest of the OPTIONS are incorrect.

88.

To calculate the sum of only absolute variables in a series, we use _________(a) sum(abs())(b) abssum()(c) sumabs()(d) abs(sum())I had been asked this question in my homework.I need to ask this question from Sums and Products in chapter Beyond the Basics of MATLAB

Answer»

The correct option is (c) sumabs()

The best I can EXPLAIN: sumabs() is a pre-defined function in MATLAB. It will select the absolute values from a series and find the summation of those values only. sum(ABS()) will convert all the values in the series to their absolute values. abs(sum()) will GIVE the absolute VALUE of the summation.

89.

To apply superposition in MATLAB, the condition, one of the condition is ___________(a) No active element is present except sources(b) No passive element is present(c) System should have unilateral elements(d) Nothing needs to be checkedI got this question by my college director while I was bunking the class.Enquiry is from Linear Systems in division Beyond the Basics of MATLAB

Answer»

Correct answer is (a) No active element is present except sources

To EXPLAIN: Superposition will definitely FAIL in presence of active elements. A SYSTEM containing only passive elements will ALWAYS follow superposition. Superposition THEOREM fails for unilateral elements., the network must have only passive elements.

90.

What is the argument of -1-i in MATLAB?(a) -3*pi/4(b) pi/4(c) 5*pi/4(d) -7*pi/4I had been asked this question in exam.I want to ask this question from Complex Arithmetic topic in division Beyond the Basics of MATLAB

Answer»

Right choice is (a) -3*pi/4

Explanation: We OBSERVE that the complex number lies in the 3^rd QUADRANT. HENCE, we conclude that the ARGUMENT of the complex number -1-i will be -3*pi/4 in MATLAB. -7*pi/4 is equivalent to -3*pi/4. Pi/4 is 5*pi/4 again.

91.

How do we change the nature of the display of the numerical answer?(a) Use the format command(b) Use the class command(c) MATLAB provides intuitive display(d) Not possibleI have been asked this question in final exam.Question is taken from Data Classes in chapter Beyond the Basics of MATLAB

Answer»

Right answer is (a) Use the format command

The explanation is: The format command is USED to change the display of numerical answer. If the format command is not invoked, MATLAB will always SHOW FOUR DIGITS after decimal point and all the digits before the decimal point.

92.

What is the value of N while creating a 27 point Hamming window?(a) 28(b) 26(c) 14(d) 13The question was asked by my school principal while I was bunking the class.I would like to ask this question from Fourier Analysis and Filtering in section Beyond the Basics of MATLAB

Answer» CORRECT choice is (B) 26

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

The sum function will return a NaN if any of the element in the input vector is NaN.(a) True(b) FalseThe question was asked in an interview for job.My doubt stems from Sums and Products in portion Beyond the Basics of MATLAB

Answer»

Correct answer is (b) False

For explanation I WOULD SAY: We can write ‘omitNaN’ within the sum function so that while computing sum, the function IGNORES every NaN element present within the INPUT vector.

Eg: A=[1,2,NaN];sum(A,’omitNaN’)- This will return 3 as answer.

94.

The default variable, to which the result of any computation.(a) True(b) FalseThe question was asked in class test.This intriguing question originated from Default Variables in division Beyond the Basics of MATLAB

Answer» RIGHT CHOICE is (a) True

To explain: Any RESULT is assigned to the variable ANS in MATLAB. If we SPECIFY a different variable, it will be assigned to that variable.
95.

The command to get more accurate solution for definite integration is ______________(a) int()(b) quad()(c) quadl()(d) not present in MATLABI had been asked this question in an international level competition.I need to ask this question from Integration in division Beyond the Basics of MATLAB

Answer»

The correct choice is (c) quadl()

Best explanation: The quadl() command is used to GET a result for definite integration with more accuracy. The quad() command does the job with LESS accuracy. The int() command returns FRACTION FORM and not a decimal form hence we cannot compare accuracy with it.

96.

What is the nature of storage of anything in MATLAB?(a) Stored as arrays(b) Stored as a data structure(c) Stored as a variable(d) Depends on nature of the inputThis question was posed to me in an internship interview.The question is from Data Classes in portion Beyond the Basics of MATLAB

Answer»

Correct answer is (a) Stored as arrays

Easy explanation: An ARRAY is a data structure. But, even a SINGLE VARIABLE in MATLAB is stored as a 1*1 array. EVERY variable we use in MATLAB is stored as an array.

97.

The bilinear transformation is done by the ________(a) bilin()(b) bilinear()(c) no such command(d) bilineartran()I have been asked this question by my school teacher while I was bunking the class.My doubt stems from Fourier Analysis and Filtering in division Beyond the Basics of MATLAB

Answer»

The correct option is (b) bilinear()

Explanation: The bilinear() COMMAND is pre-defined in MATLAB and is used to convert analog filters to DIGITAL filters with the help of the bilinear transformation. HENCE, only bilinear() is correct.

98.

How does MATLAB get the symbolic character in the function, if it is not mentioned in symsum() command?(a) It cannot(b) It uses symvar()(c) It uses symsvar()(d) It uses symbvar()The question was asked by my college professor while I was bunking the class.My doubt is from Sums and Products topic in chapter Beyond the Basics of MATLAB

Answer»

Right option is (b) It uses symvar()

Easiest explanation: If we don’t specify our symbolic variable which is in our function, the SYMSUM() command uses the symvar() command. This command RETURNS the set of all symbolic variables PRESENT in the function. In this WAY, the symsum command will continue in the execution of generating summation.

99.

The hamming command returns a ___________(a) matrix(b) row vector(c) column vector(d) no such commandThis question was posed to me in class test.Asked question is from Fourier Analysis and Filtering in division Beyond the Basics of MATLAB

Answer» RIGHT option is (c) column vector

The best EXPLANATION: The HAMMING code returns the L point hamming WINDOW as a column vector. Hence, column vector is correct.
100.

What is the command used to check the real part of a complex number in MATLAB?(a) abs()(b) realc()(c) real()(d) cannot be checkedI got this question in an interview for job.I'm obligated to ask this question of Complex Arithmetic in chapter Beyond the Basics of MATLAB

Answer»

The correct choice is (c) real()

The best EXPLANATION: The COMMAND to CHECK the real part of any complex number is real(). It is an INBUILT function in MATLAB.