

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. |
The help command works only for a pre-defined function in MATLAB.(a) True(b) FalseThe question was asked in final exam.The query is from Presenting Results topic in portion Interacting with MATLAB of MATLAB |
Answer» The CORRECT choice is (a) True |
|
2. |
A student is repeatedly calling a function file but gets no output. She has checked the file repeatedly so finally she asked her teacher about it. The teacher checked everything and finds the error and gives her a scolding. What is a silly mistake?(a) She was calling the wrong function(b) She has placed a semicolon at the end of the line which computes the desired values(c) She has called a .m file(d) She was calling a script fileI got this question in an international level competition.My enquiry is from M-Files topic in portion Interacting with MATLAB of MATLAB |
Answer» Right answer is (b) She has placed a semicolon at the end of the line which computes the desired values |
|
3. |
A for-loop can have multiple index values.(a) True(b) FalseI had been asked this question during an online exam.This key question is from Loops topic in division Interacting with MATLAB of MATLAB |
Answer» Correct answer is (a) True |
|
4. |
How would you start a debugger in MATLAB?(a) There is no M-file in MATLAB(b) Type edit in MATLAB and press Enter(c) Type debug in MATLAB and press Enter(d) Type M-file in MATLAB and press EnterThis question was addressed to me during an interview.This intriguing question comes from M-Files topic in division Interacting with MATLAB of MATLAB |
Answer» The correct answer is (b) Type EDIT in MATLAB and press Enter |
|
5. |
MATLAB allows modelling of different control systems using ___________(a) Simulink(b) Control System Toolbox(c) Not available in MATLAB as of yet(d) ezplotThis question was addressed to me at a job interview.My question is based upon The MATLAB Interface in portion Interacting with MATLAB of MATLAB |
Answer» Correct answer is (a) Simulink |
|
6. |
How will you return to execution from debugging mode?(a) Use the dbcont command(b) Use the return command(c) Use the dbcont & return command(d) Use the keyboard commandI have been asked this question in an internship interview.Question is taken from Fine Tuning topic in portion Interacting with MATLAB of MATLAB |
Answer» The CORRECT option is (c) Use the dbcont & return command |
|
7. |
The function definition is shown when we use the look for the command.(a) True(b) FalseI got this question in unit test.This question is from Fine Tuning in chapter Interacting with MATLAB of MATLAB |
Answer» Correct option is (B) False |
|
8. |
To stop execution, press _____(a) Ctrl+C(b) Use pause command(c) Use end command(d) Use keyboard commandThe question was asked in quiz.My question is based upon Fine Tuning topic in portion Interacting with MATLAB of MATLAB |
Answer» The correct answer is (a) Ctrl+C |
|
9. |
The format for 5 digit representation along with exponent is __________(a) short e(b) short g(c) short exp(d) 4 digit along with exponent value can be representedI got this question in an interview for job.The query is from Presenting Results topic in portion Interacting with MATLAB of MATLAB |
Answer» CORRECT option is (a) short e Explanation: The short e format is used to represent a RESULT with 5 digits and an exponent term. Now, this is pre-defined in MATLAB. Short g and short exp are not PRESENT in MATLAB. We cannot use a representation of 4 digits and an exponent as it is not defined in MATLAB, as of YET. |
|
10. |
How do we break from an infinite loop without keeping a break statement within the loop?(a) Press Ctrl+C(b) Press Ctrl+Z(c) Loop won’t be terminated(d) Press Ctrl+XThe question was asked during an online interview.My question comes from Loops in chapter Interacting with MATLAB of MATLAB |
Answer» Right answer is (a) Press Ctrl+C |
|
11. |
The command used to reflect the files from a disk into the workspace is _______(a) load(b) show(c) disp()(d) it is not possibleThis question was addressed to me during a job interview.The above asked question is from Presenting Results topic in chapter Interacting with MATLAB of MATLAB |
Answer» RIGHT ANSWER is (a) LOAD For explanation I WOULD SAY: The load function is pre-defined in MATLAB. It is used to load variables and/or data from the disk to the workspace. |
|
12. |
There can be multiple decision variables for while loop.(a) True(b) FalseThe question was asked by my college director while I was bunking the class.My question comes from Loops topic in section Interacting with MATLAB of MATLAB |
Answer» Correct option is (a) True |
|
13. |
A break statement will leave the outer loop.(a) True(b) FalseThe question was posed to me in an interview.My doubt stems from Loops topic in chapter Interacting with MATLAB of MATLAB |
Answer» Right OPTION is (B) False |
|
14. |
A function is not returning values according to desired input values. What should be the correction?(a) Include clear all at the beginning of function file(b) Include close all at the beginning of function file(c) Include echo on in the function file(d) Cannot be solvedI had been asked this question during an online exam.I'd like to ask this question from M-Files in division Interacting with MATLAB of MATLAB |
Answer» Right answer is (a) Include clear all at the BEGINNING of function file |
|
15. |
How do you create a function file in MATLAB?(a) Begin m-file with function definition(b) Begin script file with function definition(c) There is no such thing called function file(d) An m-file is only a function fileThe question was posed to me during an internship interview.I would like to ask this question from M-Files in division Interacting with MATLAB of MATLAB |
Answer» RIGHT option is (a) Begin m-FILE with function definition For explanation: If an m-file starts with a function definition, it becomes a function file. This file can be called to generate a desired output multiple times. As MATLAB allows the MAKING of such files, complicated big programs can be broken down to simplify the nature of the ENTIRE MATLAB program. |
|
16. |
How would you expect to see exponential inter-relation in a logarithmic scale?(a) A straight line(b) A curved line(c) Depends on the exponent(d) Depends on the log scaleThe question was posed to me by my school principal while I was bunking the class.Enquiry is from Fine Tuning in division Interacting with MATLAB of MATLAB |
Answer» Right answer is (a) A straight line |
|
17. |
It is not possible to store graphs as MAT-file.(a) True(b) FalseThis question was posed to me in an online quiz.This is a very interesting question from Presenting Results topic in chapter Interacting with MATLAB of MATLAB |
Answer» Right CHOICE is (a) True |
|
18. |
How do you show the program of an MAT file?(a) The program should contain the echo command(b) The program should contain the showprog command(c) The program should contain the diary command(d) The program cannot be shown while running a MEX fileThis question was addressed to me during a job interview.My question is taken from Presenting Results topic in chapter Interacting with MATLAB of MATLAB |
Answer» The correct CHOICE is (d) The program cannot be shown while RUNNING a MEX FILE |
|
19. |
MEX files work on JAVA.(a) True(b) FalseThe question was posed to me in an online quiz.This key question is from M-Files in chapter Interacting with MATLAB of MATLAB |
Answer» The CORRECT answer is (B) False |
|
20. |
There will be a problem in computing the logarithm of a negative number.(a) True(b) FalseThe question was posed to me at a job interview.The question is from Fine Tuning in division Interacting with MATLAB of MATLAB |
Answer» Right choice is (B) False |
|
21. |
We cannot plot a discrete and continuous relationship in the same graph.(a) True(b) FalseThe question was asked in an online interview.The above asked question is from Presenting Results topic in portion Interacting with MATLAB of MATLAB |
Answer» Right choice is (b) False |
|
22. |
What does the echo command do?(a) It echoes(b) It shows the comments present in Script files(c) It shows the commands and comments in MAT-files(d) It shows the commands and the comments in M-filesI have been asked this question in an online interview.Query is from M-Files in division Interacting with MATLAB of MATLAB |
Answer» The CORRECT OPTION is (d) It shows the COMMANDS and the comments in M-files |
|
23. |
How to stop the execution of a chain of commands?(a) Press Ctrl +c(b) Cannot be stopped(c) Only usage of debugging mode is possible in MATLAB(d) QuitThis question was addressed to me in examination.This intriguing question originated from The MATLAB Interface in chapter Interacting with MATLAB of MATLAB |
Answer» The CORRECT option is (a) Press Ctrl +c |
|
24. |
What are the difference between the ‘help’ and the ‘look for’ command?(a) No difference(b) Syntactical difference(c) Help returns the entire set while look for returns specific commands(d) Help returns all the toolbox while look for returns a single toolboxThis question was posed to me in exam.My question is taken from The MATLAB Interface in portion Interacting with MATLAB of MATLAB |
Answer» The correct option is (c) Help returns the entire SET while look for returns specific commands |
|
25. |
The function to close the windows containing graphs generated from MATLAB is __________(a) close all(b) close graphs(c) delete graphs(d) end allI had been asked this question by my school principal while I was bunking the class.This intriguing question originated from The MATLAB Interface in chapter Interacting with MATLAB of MATLAB |
Answer» The correct choice is (a) close all |
|
26. |
What are MEX files in MATLAB?(a) No such thing as MEX files(b) Helps to analyse commands in MATLAB(c) Allows the user to combine C source files with Matlab files(d) Same as MAT filesI have been asked this question by my college director while I was bunking the class.Question is taken from The MATLAB Interface topic in portion Interacting with MATLAB of MATLAB |
Answer» The correct CHOICE is (c) Allows the user to COMBINE C SOURCE files with MATLAB files |
|
27. |
Global variables must be mentioned _____ an M-file.(a) at the top in(b) anywhere in(c) out of the(d) there is nothing called global variablesThe question was posed to me by my school principal while I was bunking the class.I would like to ask this question from Fine Tuning in division Interacting with MATLAB of MATLAB |
Answer» Right choice is (a) at the top in |
|
28. |
A loop is used to avoid repetitive writing of the same function in the code.(a) True(b) FalseThis question was addressed to me in an online interview.My doubt stems from Fine Tuning topic in section Interacting with MATLAB of MATLAB |
Answer» The correct answer is (a) True |
|
29. |
What is the basic difference between M-files and MAT-files?(a) There is no difference(b) MAT files are binary data files while m-files are ASCII text files(c) M files are binary data files while MAT-files are ASCII text files(d) There is no such thing as MAT filesThis question was addressed to me in examination.The origin of the question is M-Files in chapter Interacting with MATLAB of MATLAB |
Answer» CORRECT option is (b) MAT files are BINARY DATA files while m-files are ASCII text files Best explanation: M-files are ASCII text files which are used to simplify our program EDITING in MATLAB, they are basic text files. MAT files are Binary files created by MATLAB. When we need to save any data from the workspace, it is saved in MATLAB as a MAT file. |
|
30. |
What is the extension of script files?(a) .m(b) .mat(c) .script(d) There is a nothing called script fileThis question was addressed to me in an interview for job.My question is based upon M-Files in section Interacting with MATLAB of MATLAB |
Answer» Right OPTION is (a) .m |
|
31. |
The function to plot a graph with both axes on logarithmic scales is __________(a) loglog(b) log(c) semilog(d) not possibleThe question was posed to me in homework.Enquiry is from Presenting Results topic in chapter Interacting with MATLAB of MATLAB |
Answer» Correct OPTION is (a) loglog |
|
32. |
Which operator is used to prevent the printing of insignificant zeros?(a) %o(b) %nz(c) %g(d) It is not possibleI had been asked this question in exam.The question is from Presenting Results topic in portion Interacting with MATLAB of MATLAB |
Answer» Correct answer is (C) %G |
|
33. |
What is the equivalent of subplot (1, 1, 1)?(a) subplot()(b) plot(c) It is not possible(d) axesI have been asked this question in an internship interview.The question is from Presenting Results topic in portion Interacting with MATLAB of MATLAB |
Answer» RIGHT answer is (d) AXES The explanation is: While using subplot (1,1,1), we have allocated MEMORY as a 2-D matrix for only 1 graph. This is similar to the axes COMMAND which generates an empty graph. This is pre-defined in MATLAB. |
|
34. |
The plotting of 3d plots and 2d plots requires separate windows. But the user has entered the hold on command. What is to be done?(a) Use the pause command(b) Use the hold off command(c) Use the close command(d) Nothing can be doneThis question was posed to me during an interview.I need to ask this question from Fine Tuning topic in portion Interacting with MATLAB of MATLAB |
Answer» The CORRECT option is (a) Use the PAUSE command |
|
35. |
How would you plot multiple graphs in MATLAB?(a) Using the hold function(b) Using the mplot function(c) Using the mstem function(d) It cannot be done in MATLABThis question was posed to me during an online interview.The above asked question is from Presenting Results topic in division Interacting with MATLAB of MATLAB |
Answer» Correct choice is (a) Using the HOLD function |
|
36. |
What is not displayed by the Workspace?(a) Time of variable generation(b) Standard deviation of the variable values(c) Class of the variables(d) Nature of the variablesThe question was posed to me in semester exam.The doubt is from The MATLAB Interface topic in chapter Interacting with MATLAB of MATLAB |
Answer» The correct answer is (a) Time of VARIABLE generation |
|
37. |
What is the default increment value in a for-loop?(a) 0(b) 1(c) An increment value is necessary(d) 0/1The question was posed to me in an internship interview.I need to ask this question from Loops in division Interacting with MATLAB of MATLAB |
Answer» RIGHT answer is (b) 1 Easiest explanation: When we are GOING to start a for loop in MATLAB, it is not necessary to assign a specific increment value. The default increment value will then be TAKEN as 1. |
|
38. |
Where do we need to store a function to call it in other programs?(a) The bin folder(b) Anywhere(c) The MATLAB folder(d) DesktopI got this question by my college professor while I was bunking the class.My question is based upon The MATLAB Interface topic in division Interacting with MATLAB of MATLAB |
Answer» RIGHT answer is (a) The BIN folder To elaborate: M-files CONTAINING only a function has to be WRITTEN separately and has to be stored as .m files in the bin folder. If it stored in any other folder, MATLAB won’t be able to access the function file. |
|
39. |
How will one escape from printing graphs of variables, whose value gets changed for the program?(a) Use the clear all command at the beginning(b) Use the close all command at the beginning(c) Use the clc command(d) Cannot be escapedI had been asked this question in class test.I'm obligated to ask this question of Fine Tuning topic in division Interacting with MATLAB of MATLAB |
Answer» Right option is (a) Use the clear all command at the beginning |
|