

InterviewSolution
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.
1. |
What is the purpose of the line command if the plot command can be used to directly accept the arguments and generate a plot?(a) Saves complexity(b) We can refrain from using the hold function(c) There is no separate, definite purpose(d) Cannot concludeI got this question in an interview for job.This interesting question is from Plotting Multiple Curves in section MATLAB Basics of MATLAB |
Answer» Correct option is (d) Cannot conclude |
|
2. |
What would you use to show comparisons of profit of 3 industries over 3 quarters?(a) Histogram plot(b) Bar plot(c) Bode plot(d) Frequency plotThe question was posed to me in unit test.My enquiry is from Statistics in portion MATLAB Basics of MATLAB |
Answer» Right OPTION is (b) Bar PLOT |
|
3. |
How does MATLAB help in passing function arguments?(a) By call by value and call by reference(b) Only by call by value(c) Only by call by reference(d) By call by addressI had been asked this question in homework.This interesting question is from Functions in chapter MATLAB Basics of MATLAB |
Answer» CORRECT option is (a) By call by value and call by reference To explain I would SAY: Like C, MATLAB allows to pass almost all arguments by value. But, if the argument passed into the function is only for mathematical purpose then it is passed as a reference. This helps in SAVING the memory reserved for the ORIGINAL value of the argument. |
|
4. |
If the dimensions of vectors don’t match, the plot command will always give an error.(a) True(b) FalseThis question was addressed to me in an internship interview.This is a very interesting question from Vectors and Matrices in portion MATLAB Basics of MATLAB |
Answer» RIGHT OPTION is (b) False The best I can EXPLAIN: In the following case: plot([a],[1:10]), the plot command takes x as [a-1:.2:a+1]. Hence, the above statement is not true. A GRAPH will EVENTUALLY get plotted. |
|
5. |
Which operator set is used for left and right division respectively?(a) .\ and ./(b) ./ and .\(c) Left division and right division is not available in MATLAB(d) / and \This question was posed to me in quiz.I need to ask this question from Vectors and Matrices topic in chapter MATLAB Basics of MATLAB |
Answer» Correct choice is (a) .\ and ./ |
|
6. |
Choose the correct option as an inference from the following workspace view.(a) ‘ans’, ‘p’ and ‘ap’ are double variables(b) ‘ans’ and ‘p’ are double variables while ‘c’ is a character variable(c) ‘ap’ is symbolic object, ‘c’ is a double variable(d) ‘c’ is a symbolic characterI had been asked this question by my college director while I was bunking the class.This interesting question is from Managing Variables topic in section MATLAB Basics of MATLAB |
Answer» CORRECT answer is (b) ‘ans’ and ‘P’ are DOUBLE variables while ‘c’ is a character variable For EXPLANATION I would SAY: It is to be noted that ‘ans’ and ‘p’ are double integer variables, ‘c’ is a character variable while ‘ap’ is a symbolic object. |
|
7. |
MATLAB stands for?(a) matrix laboratory(b) math library(c) matric library(d) matrix libraryI have been asked this question in homework.This key question is from Input and Output in chapter MATLAB Basics of MATLAB |
Answer» Correct choice is (a) matrix LABORATORY |
|
8. |
A student has to find the solution of an equation cos(x)=1/2. She has to write the program such that exact values are shown at output. Which of the following codes would help her?(a) syms x;eqn = cos(x) == 1/2;vpa( solve(eqn,x))(b) syms x;eqn = cos(x) == 1/2;solve(eqn,x)(c) vpa(solve(‘cos(x)=1/2’))(d) syms x;eqn = cos(x) = 1/2;vpa(solve(eqn,x))The question was asked in homework.My enquiry is from Solving Equations topic in portion MATLAB Basics of MATLAB |
Answer» The CORRECT answer is (c) vpa(solve(‘cos(x)=1/2’)) |
|
9. |
What is the difference between the expressions (9*1-8) & (9-1*8)?(a) Computational difference(b) Final results are different(c) No difference(d) Cannot be determinedThis question was addressed to me by my school teacher while I was bunking the class.My question is from Variables and Assignments in division MATLAB Basics of MATLAB |
Answer» The correct answer is (a) Computational difference |
|
10. |
How would you express a pi as a character and an integer? Choose the correct code.(a) a=pi;b=’pi’;(b) a=22/7; b=pi;(c) a=3.1415; b=22/7;(d) a=3.1429;b=’pi’;This question was posed to me during an interview for a job.I'm obligated to ask this question of Managing Variables in portion MATLAB Basics of MATLAB |
Answer» Correct answer is (a) a=pi;b=’pi’; |
|
11. |
The student receives an error while trying to plot multiple graphs using the hold command. What is there error if there is no a syntactical error?(a) Cannot be determined(b) The plot function is not defined with a constant variable range(c) There is no hold command(d) There has to be a syntactical error onlyThe question was asked in semester exam.The origin of the question is Plotting Multiple Curves in section MATLAB Basics of MATLAB |
Answer» Correct answer is (b) The PLOT function is not defined with a constant variable RANGE |
|
12. |
What is the difference between hold on and hold all?(a) no difference(b) hold all holds every plot while hold on holds a specific plot in the chain of argument(c) hold all does not exist(d) hold on is syntactically incorrectI got this question in final exam.My query is from Plotting Multiple Curves in chapter MATLAB Basics of MATLAB |
Answer» Right answer is (a) no difference |
|
13. |
If we want to plot matrix arguments, which of the following gets plotted?(a) Column wise inter-relation of two arguments(b) Row wise inter-relation of two arguments(c) Diagonally inter-relation of two arguments(d) The arguments are incomprehensibleI have been asked this question in a national level competition.This key question is from Graphics in chapter MATLAB Basics of MATLAB |
Answer» CORRECT answer is (a) COLUMN wise inter-relation of TWO arguments Best explanation: We have to keep in mind the order while trying to plot two matrix arguments. MATLAB will take the column wise relation between the two arguments. So, if x=[x1 X2 x3];y=[y1 y2 y3]; plot(x,y)- MATLAB will generate a plot between (x1,y1),(x2,y2) and so on. |
|
14. |
What is the function used to multiply a matrix, A, with itself n times?(a) mtimes(A,n)(b) ntimes(A,n)(c) mtimes(n,A)(d) mtimes(A^n)I have been asked this question during an interview for a job.Enquiry is from Vectors and Matrices in chapter MATLAB Basics of MATLAB |
Answer» Right answer is (a) mtimes(A,N) |
|
15. |
Command is used to save command window text to file.(a) saveas(b) texttofile(c) diary(d) todiaryThis question was addressed to me in an internship interview.This is a very interesting question from Input and Output in division MATLAB Basics of MATLAB |
Answer» Right choice is (c) diary |
|
16. |
If A and B are two matrices, such that a./b=b.\a, what is concluded?(a) Nothing special(b) A = A^T(c) A = A^-1(d) A = AThe question was posed to me by my college professor while I was bunking the class.I would like to ask this question from Vectors and Matrices topic in portion MATLAB Basics of MATLAB |
Answer» The CORRECT CHOICE is (a) Nothing special |
|
17. |
After trying to plot a pie-chart, the student finds that the function he used is rose(). What is the nature of data used by the student if an output graph is generated?(a) Angles in radians(b) Linear bivariate(c) Logarithmic(d) This is not possible in MATLABThe question was asked in an online quiz.Question is from Graphics topic in chapter MATLAB Basics of MATLAB |
Answer» Correct CHOICE is (b) Linear bivariate |
|
18. |
All matrices are vectors but all vectors are not matrices in MATLAB.(a) True(b) FalseI have been asked this question during an online interview.This intriguing question originated from Vectors and Matrices in division MATLAB Basics of MATLAB |
Answer» Correct ANSWER is (a) TRUE |
|
19. |
What is the symbol used to evaluate the transpose of a vector?(a) “ ^ ”(b) “ * ”(c) “ ‘ ”(d) “ ~ ”I have been asked this question in my homework.This intriguing question originated from Vectors and Matrices in division MATLAB Basics of MATLAB |
Answer» Correct CHOICE is (c) “ ‘ ” |
|
20. |
Which is an escape sequence constant?(a) Esc(b) /n(c) \b(d) nargoutThis question was posed to me during an internship interview.I'm obligated to ask this question of Variables and Assignments in division MATLAB Basics of MATLAB |
Answer» CORRECT ANSWER is (c) \b Explanation: An escape sequence character constant is used in functions which are used to show output. ‘\b’ means BACKSPACE. ‘Esc’,‘/N’, are strings. ‘nargout’ is a pre-defined function in MATLAB. |
|
21. |
The uniform distribution can range from -infinity to 0 or 0 to Infinity but not from -infinity to infinity.(a) True(b) FalseI have been asked this question in final exam.This intriguing question originated from Errors in Input topic in division MATLAB Basics of MATLAB |
Answer» The correct option is (b) False |
|
22. |
What is the size of double and symbolic variables holding integer constants?(a) 8 bytes and 16 bytes(b) 16 bytes and 112 bytes(c) 32 bytes and 26 bytes(d) 23 bytes and 112 bytesThis question was addressed to me in an interview for job.My question is taken from Managing Variables in chapter MATLAB Basics of MATLAB |
Answer» Correct option is (a) 8 bytes and 16 bytes |
|
23. |
How would you simplify log(x^20) – log(x^13) – log(x^7)in MATLAB? (Assume x is defined as a string variable)(a) simplify(log(x^20)-log(x^13)–log(x^7));(b) log(x^20) – log(x^13) – log(x^7)(c) simplify(log(x^20)-log(x^13)–log(x^7),’IgnoreAnalyticConstraints’,true)(d) simplify(log(x^20)-log(x^13)–log(x^7))I have been asked this question in an interview for job.Question is from Algebra in section MATLAB Basics of MATLAB |
Answer» Correct option is (c) SIMPLIFY(log(x^20)-log(x^13)–log(x^7),’IgnoreAnalyticConstraints’,TRUE) |
|
24. |
Which command is used to clear a command window?(a) clear(b) close all(c) clc(d) clear allThe question was posed to me in an internship interview.The origin of the question is Input and Output topic in chapter MATLAB Basics of MATLAB |
Answer» The correct option is (c) clc |
|
25. |
Does the plot function take multiple arguments to a plot?(a) True(b) False(c) Sometimes(d) Only if the functions are in time domainI have been asked this question by my college professor while I was bunking the class.My question is based upon Plotting Multiple Curves topic in portion MATLAB Basics of MATLAB |
Answer» RIGHT choice is (a) True The best explanation: The plot FUNCTION can take MULTIPLE INPUT arguments to plot multiple GRAPHS. This is an inbuilt function so the nature of the function is, inherently, to take multiple arguments if the arguments are defined. |
|
26. |
A student has created a plot of y(t)=t^2. He is need to show another graph of z(t)=t^3 in the same plot. But every time he hits the plot() function- MATLAB generates a plot of z(t) vs t but on a different window. What is the error?(a) It is not possible to plot multiple plots(b) He is not using the line function(c) Maybe he is using stem() instead of plot()(d) He is not using the hold functionI have been asked this question during an interview.Question is from Plotting Multiple Curves topic in portion MATLAB Basics of MATLAB |
Answer» The correct option is (d) He is not using the hold function |
|
27. |
To specify different curves in an angle histogram plot, we use the _________ function.(a) legend(b) display(c) gtext()(d) mtextThis question was addressed to me in final exam.This is a very interesting question from Statistics topic in division MATLAB Basics of MATLAB |
Answer» CORRECT ANSWER is (a) legend The best I can EXPLAIN: The legend function is pre-defined in MATLAB. It is used to PRINT the names of the curves present in a PLOT. The function is the same for both 2d and 3d plots. |
|
28. |
A cubic system can be represented using the function ____(a) plot3(b) stem()(c) display(d) legendI have been asked this question in quiz.My question comes from Statistics topic in chapter MATLAB Basics of MATLAB |
Answer» Right OPTION is (a) plot3 |
|
29. |
How can the formulation of polynomial be done from its roots?(a) poly(r), r is a row vector, containing the roots of the polynomial(b) poly([roots as a coloumn vector])(c) poly([roots as a row vector])(d) poly([roots in descending order as a coloumn vector])This question was posed to me by my college professor while I was bunking the class.My enquiry is from Algebra topic in section MATLAB Basics of MATLAB |
Answer» Right option is (b) poly([roots as a COLOUMN vector]) |
|
30. |
Choose the correct option.(a) any() shows all the elements in a matrix while all() shows every element of a vector(b) any() is ‘true’ if elements in a vector is zero(c) all() is ‘true’ if every element in a vector is non zero(d) all() is ‘true’ if every element in a vector is 0The question was posed to me during an online exam.The origin of the question is Variables and Assignments in chapter MATLAB Basics of MATLAB |
Answer» RIGHT choice is (c) all() is ‘true’ if every element in a VECTOR is non zero Easy explanation: ‘any()’ and ‘all()’ are pre-defined FUNCTIONS in MATLAB. The function ‘any()’ returns 1 if every element of the vector, mentioned WITHIN the PARENTHESES, is non-zero. The function ‘all()’ returns 1 if any element of the vector is non-zero. |
|
31. |
Command used to display the value of variable x.(a) displayx(b) disp(x)(c) disp x(d) vardisp(‘x’)This question was addressed to me during an online interview.I need to ask this question from Input and Output in chapter MATLAB Basics of MATLAB |
Answer» Right answer is (b) disp(x) |
|
32. |
How to introduce a title to describe the subplots generated in MATLAB?(a) Use a function(b) Use the title function(c) Use the legend function(d) Use uipanel()I had been asked this question by my college director while I was bunking the class.This key question is from Plotting Multiple Curves in division MATLAB Basics of MATLAB |
Answer» Right answer is (d) USE uipanel() |
|
33. |
To display the partnership of 3 batsman with one batsman, one uses _________(a) Bar-graph(b) Histogram(c) Pie plot(d) Cannot be displayedThis question was posed to me in examination.My query is from Statistics topic in section MATLAB Basics of MATLAB |
Answer» The CORRECT answer is (b) Histogram |
|
34. |
Which command can be used for single step execution in debugging mode?(a) dbstep(b) dbstepin(c) dbstatus(d) dbcontI had been asked this question in examination.My enquiry is from Functions topic in chapter MATLAB Basics of MATLAB |
Answer» Correct option is (a) dbstep |
|
35. |
If solve does not return any solution, what does it imply?(a) The equation has no definite solution(b) The equation has a solution for a specific interval(c) The equation may be solvable but the function ‘solve’ cannot produce a solution(d) There is no function ‘solve’The question was asked in examination.This intriguing question comes from Solving Equations topic in chapter MATLAB Basics of MATLAB |
Answer» Correct choice is (c) The equation may be solvable but the function ‘solve’ cannot PRODUCE a solution |
|
36. |
What is the disadvantage of the whos function in MATLAB?(a) It does not show the values of the variable(b) It does not show the size of the variable(c) It does not show the class of the variable(d) It does not show the name of the variableThe question was posed to me in quiz.Origin of the question is Managing Variables in chapter MATLAB Basics of MATLAB |
Answer» Correct answer is (a) It does not show the values of the VARIABLE |
|
37. |
What is the difference between syms ‘x’ and sym ‘x’?(a) there is no difference, they are the same functions(b) they are equivalent(c) syms ‘x’makes the declaration long lasting while sym ‘x’ makes the declaration short lasting(d) syms ‘x’ makes the symbol short lasting while sym ‘x’ makes the declaration long lastingThe question was asked in an interview.My question comes from Algebra in chapter MATLAB Basics of MATLAB |
Answer» The correct choice is (c) syms ‘x’MAKES the declaration long lasting while sym ‘x’ makes the declaration short lasting |
|
38. |
Predominantly, what are the two kinds of errors in MATLAB programs?(a) Syntax and runtime(b) Syntax and logic(c) Logic and runtime(d) Syntax and algorithmicI had been asked this question during an interview for a job.Origin of the question is Functions in portion MATLAB Basics of MATLAB |
Answer» The correct answer is (a) Syntax and runtime |
|
39. |
The function to plot vector fields is ___________(a) quiver()(b) pie3(c) ezplot()(d) contour()This question was addressed to me in exam.I want to ask this question from Plotting Multiple Curves in division MATLAB Basics of MATLAB |
Answer» Correct answer is (a) quiver() |
|
40. |
What is the difference between a[] and a{}?(a) a[] is for empty cell array while a{} is for empty linear array(b) a[] is for empty linear array while a{} is for empty cell array(c) No difference(d) a[] is an empty row vector while a{} is an empty column vectorThis question was posed to me during an interview for a job.I would like to ask this question from Vectors and Matrices in section MATLAB Basics of MATLAB |
Answer» The correct answer is (b) a[] is for empty linear ARRAY while a{} is for empty CELL array |
|
41. |
Vectors depend upon brackets while scalars don’t.(a) True(b) FalseThe question was posed to me in a job interview.I'd like to ask this question from Vectors and Matrices in section MATLAB Basics of MATLAB |
Answer» The correct answer is (a) True |
|
42. |
All MATLAB computations are done in(a) Single Precision(b) Double Precision(c) Linear accuracy(d) Multi-level precisionThe question was asked during an interview.This is a very interesting question from Variables and Assignments topic in portion MATLAB Basics of MATLAB |
Answer» The correct option is (b) DOUBLE Precision |
|
43. |
The expression cos(90) is equal to1 in MATLAB.(a) True(b) FalseI had been asked this question by my college professor while I was bunking the class.Enquiry is from Variables and Assignments in section MATLAB Basics of MATLAB |
Answer» Correct option is (b) False |
|
44. |
What does the Workspace show?(a) Attributes of variables, functions from command window(b) Attributes of variables, script files from command window(c) Attributes of variables, script files, functions from command window(d) Attributes of variables from command windowThe question was posed to me during an internship interview.I want to ask this question from Managing Variables topic in portion MATLAB Basics of MATLAB |
Answer» Correct option is (c) Attributes of variables, script FILES, functions from command window |
|
45. |
If a./b=(b./a)^T, what can be concluded about the matrices a and b?(a) a = b^T(b) a = b^-1(c) a = b’(d) nothing specialI have been asked this question in quiz.I would like to ask this question from Vectors and Matrices in chapter MATLAB Basics of MATLAB |
Answer» The correct option is (a) a = B^T |
|
46. |
Which function is preferable to find the magnitude of a complex number?(a) abs()(b) sqrt()(c) cart2pol()(d) MATLAB does not support complex argumentsThe question was posed to me in an interview for internship.This interesting question is from Variables and Assignments topic in portion MATLAB Basics of MATLAB |
Answer» Right CHOICE is (a) ABS() |
|
47. |
What is the difference between sqrt(10) and sqrt(sym(10))?(a) There is no difference(b) sqrt(sym(10)) is incorrect(c) There is no function as sqrt(d) sqrt(10) returns exact value while sqrt(sym(10)) returns 10^(1/2)This question was addressed to me in an international level competition.The question is from Solving Equations topic in division MATLAB Basics of MATLAB |
Answer» The correct ANSWER is (d) sqrt(10) returns exact value while sqrt(sym(10)) returns 10^(1/2) |
|
48. |
The function to evaluate the value of a polynomial,l for a constant value of the independent variable(say a)in the polynomial is ______(a) poly(p,a), p is a row vector(b) polyder(p)(c) polyint(p)(d) polyval(c,a), c is a row vectorThis question was addressed to me during an internship interview.My query is from Algebra topic in division MATLAB Basics of MATLAB |
Answer» The correct ANSWER is (d) polyval(c,a), c is a ROW vector |
|
49. |
Largest and smallest values for integer classes is 127 to -128.(a) True(b) FalseThis question was posed to me in an interview for job.This question is from Arithmetic topic in chapter MATLAB Basics of MATLAB |
Answer» RIGHT option is (a) True To ELABORATE: Obtain these values with the intmax and intmin functions: intmax(‘int8’) ans = 127 intmin(‘int8’)– ans = 128. |
|
50. |
Can we have multiple 3d plots in MATLAB?(a) Yes(b) No(c) Maybe(d) Cannot be determinedThe question was asked in class test.I would like to ask this question from Plotting Multiple Curves topic in chapter MATLAB Basics of MATLAB |
Answer» RIGHT answer is (a) Yes To elaborate: The plot3() function is a pre-defined function in MATLAB. So, it will allow the use to generate multiple 3d PLOTS. This is inherent to the SYSTEM. |
|