This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Graphics”.
1. What are the functions to see the graph of a continuous and a discrete function?
a) plot() & stem()
b) cont() & disc()
c) plot() & disc()
d) cont() & stem()
2. Find the error in the following code.
x=-10:1:10; y=-10:2:10; plot(x,y)
a) Plot is not available in MATLAB
b) Syntax of plot is wrong
c) Length of x and y should be same
d) No error
3. What is the output in the following code?
x=-10:1:10; y=-10:1:10;axis(‘off’); plot(x,y)
b) A graph will be shown without axes
c) A graph will be shown with axes
d) 2 graphs will be shown- one with axes and with no axes
4. 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 incomprehensible
5. To bring the scale of each axis to logarithmically spaced, the student entered ‘semilogx()’. What really happened?
a) The plot will appear with both axis now logarithmically spaced
b) semilogx() is an invalid function
c) The plot will appear with x axis logarithmically spaced
7. 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
d) This is not possible in MATLAB
8. To place a text on the plot using a mouse, the command used is _________
9. What is the condition on x in bar(x,y)?
a) No condition as such
b) Should change linearly
c) Should increase of decrease monotonously
10. If we put bar(x,y,1.2), we will get _____ bars.
11. A student has to plot a graph of f(x)=t and g(y)=t in the same graph, with t as a parameter. The function he uses is ____