The MATLAB Interface

MATLAB

This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “The MATLAB Interface”.

1. Which functions help you to save and load variables?
a)

>> save Lays [a,b]
>> load('myfile.mat')

b)

>> save Lays {a b}
>> load myfile.mat

c)

>> save Lays “a,b”
>> load(myfile.mat)

d)

>> save Lays a b
>> load('myfile.mat')

2. To add comments in MATLAB, use _________
a) //
b) %/
c) /%
d) %

3. To display comments of M-file, we use ____________
a) echo on
b) comment on
c) show %
d) Cannot be displayed

4. 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) Desktop

5. 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 toolbox

6. What will the following set of commands do when they are present in a script file?

stem[y1,y2];
title(‘p’);
print -deps p

a) Plot the discrete graph of y1 and y2
b) There is no stem command in MATLAB
c) Store the graph as a separate file
d) Cannot be determined

7. The function to close the windows containing graphs generated from MATLAB is __________
a) close all
b) close graphs
c) delete graphs
d) end all

8. 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 variables

9. MATLAB allows modelling of different control systems using ___________
a) Simulink
b) Control System Toolbox
c) Not available in MATLAB as of yet
d) ezplot

10. 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) Quit

11. 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 files

Leave a Reply

Your email address will not be published. Required fields are marked *