REVA University
School of Mechanical Engineering
MCQ Questions on MAT Lab
Assignment -1
Class 4th Sem Mechatronics Faculty In-charge: Dr. Veerbhadrappa
Student Name: SRN: _ _ _ _ _ _ _ _ _
Q.NO. Question Option Marks
a) Matrix Laboratory b) Math
What does MATLAB
1 Language c) Mathematics
stand for?
Laboratory d) Multi Array Tool
Which command is used
2 to clear all variables a) clc b) clear c) cls d) reset
from the workspace?
How do you start the a) edit b) start c) editor d)
3
MATLAB editor? new
Which symbol is used to
4 comment a line in a) # b) // c) % d) /* */
MATLAB?
What is the default file
a) .mat b) .m c) .ml d)
5 extension for MATLAB
.matlab
script files?
Which command is used
to display output in the a) display() b) print() c) disp()
6
MATLAB command d) echo()
window?
How can you clear the
7 command window in a) reset b) clc c) clear d) flush
MATLAB?
What data structure is
a) Lists b) Arrays c) Matrices
8 MATLAB primarily based
d) Trees
on?
What is the result of the
9 command length([1, a) 2 b) 4 c) 1 d) 3
2; 3, 4])?
a) To execute a block of code
What is the purpose of
repeatedly b) To define a
10 the for loop in
function c) To plot graphs d) To
MATLAB?
clear variables
Which command is used
a) func b) function c) def d)
11 to define a function in
create
MATLAB?
How do you terminate a a) break b) stop c) end d)
12
while loop in MATLAB? exit
a) Displays 'Hello World' in the
What is the output of Command Window b) Saves
13 disp('Hello 'Hello World' to a file c) Creates a
World')? variable named 'Hello World' d)
Opens a dialog box
Which operator is used
14 a) b) . c) x d) /
for element-wise
Students Name: _____________________________ SRN: ____________________
REVA University
School of Mechanical Engineering
MCQ Questions on MAT Lab
Q.NO. Question Option Marks
multiplication in
MATLAB?
How do you create a
a) zeros(3) b) zeros(3,3) c)
15 3x3 matrix of zeros in
zeros[3] d) zeros{3}
MATLAB?
a) The number of elements in a
What does the size matrix b) The dimensions of a
16 function return in matrix c) The sum of matrix
MATLAB? elements d) The maximum value
in a matrix
How can you plot a a) graph() b) plot() c) draw()
17
graph in MATLAB? d) figure()
What is the purpose of a) To execute code conditionally
18 the if statement in b) To define a loop c) To create a
MATLAB? matrix d) To display output
Which command is used
a) stop b) pause c) wait d)
19 to pause the execution
break
of a script?
a) To execute a block of code
What is the purpose of
repeatedly b) To define a
20 the for loop in
function c) To plot graphs d) To
MATLAB?
clear variables
Which command is used
a) func b) function c) def d)
21 to define a function in
create
MATLAB?
How do you terminate a a) break b) stop c) end d)
22
while loop in MATLAB? exit
How do you create a
a) eye(3) b) ones(3) c) zeros(3)
23 3x3 identity matrix in
d) diag(3)
MATLAB?
Which operator is used
24 for matrix multiplication a) .* b) * c) x d) /
in MATLAB?
a) Computes the determinant of
matrix A b) Computes the inverse
What does the
of matrix A c) Computes the
25 command inv(A) do in
transpose of matrix A d)
MATLAB?
Computes the eigenvalues of
matrix A
How do you extract the
a) A(:,2) b) A(2,:) c) A(2,2) d)
26 second row of a matrix
A(2)
A?
a) Matrix multiplication b)
What is the result of Element-wise multiplication c)
27
A.*B in MATLAB? Matrix addition d) Element-wise
addition
Which command is used
a) det(A) b) inv(A) c) diag(A)
28 to find the determinant
d) eig(A)
of a matrix?
Students Name: _____________________________ SRN: ____________________
REVA University
School of Mechanical Engineering
MCQ Questions on MAT Lab
Q.NO. Question Option Marks
How do you
a) [A;B] b) [A,B] c) horzcat(A,B)
29 concatenate two
d) Both b and c
matrices horizontally?
a) The determinant of matrix A b)
What does the The eigenvalues and eigenvectors
30 command eig(A) of matrix A c) The inverse of
return? matrix A d) The transpose of
matrix A
How do you calculate
a) A' b) transpose(A) c) Both a
31 the transpose of a
and b d) A.T
matrix A?
a) The number of elements in
What does the matrix A b) The dimensions of
32 command size(A) matrix A c) The determinant of
return? matrix A d) The inverse of matrix
A
Which command is used
a) sin(angle) b) cos(angle) c)
33 to calculate the sine of
tan(angle) d) cot(angle)
an angle in MATLAB?
What is the output of
34 a) 1 b) -1 c) 0 d) Undefined
cos(pi) in MATLAB?
How do you calculate
a) asin(value) b) sin(value) c)
35 the inverse sine of a
arcsin(value) d) invsin(value)
value in MATLAB?
Which function is used
a) tan(angle) b) cot(angle) c)
36 to calculate the tangent
atan(angle) d) sec(angle)
of an angle?
a) The tangent of y/x b) The
What does the
angle between the positive x-axis
37 command atan2(y,
and the point (x, y) c) The inverse
x) compute?
tangent of y/x d) The sine of y/x
How do you calculate
a) sinh(angle) b) sin(angle) c)
38 the hyperbolic sine of
asinh(angle) d) tanh(angle)
an angle in MATLAB?
What is the result of
a) Undefined b) 0 c) 1 d)
39 sec(pi/2) in
Infinity
MATLAB?
Which function is used
a) cot(angle) b) tan(angle) c)
40 to calculate the
sec(angle) d) csc(angle)
cotangent of an angle?
How do you convert a) rad2deg(angle) b)
41 degrees to radians in deg2rad(angle) c) radians(angle)
MATLAB? d) degrees(angle)
What is the output of a) 1 b) 0 c) Undefined d)
42
sin(0) in MATLAB? Infinity
Which command is used
a) plot() b) graph() c) draw()
43 to create a basic 2D plot
d) figure()
in MATLAB?
Students Name: _____________________________ SRN: ____________________
REVA University
School of Mechanical Engineering
MCQ Questions on MAT Lab
Q.NO. Question Option Marks
How do you add a title a) title('Title') b) xlabel('Title')
44
to a plot in MATLAB? c) ylabel('Title') d) legend('Title')
a) Clears the current plot b)
What does the hold
Allows multiple plots on the same
45 on command do in
figure c) Saves the plot d)
MATLAB?
Stops the plot execution
Which function is used
a) bar() b) plot() c) histogram()
46 to create a bar graph in
d) scatter()
MATLAB?
How do you label the x- a) xlabel('Label') b) ylabel('Label')
47
axis of a plot? c) title('Label') d) legend('Label')
a) To create multiple plots in
What is the purpose of separate windows b) To create
48
the subplot function? multiple plots in the same figure
c) To save plots d) To clear plots
Which function is used
a) scatter() b) plot() c) bar()
49 to create a scatter plot
d) pie()
in MATLAB?
How do you display a) grid on b) gridlines() c)
50
gridlines on a plot? showgrid() d) plotgrid()
a) Adds a title to the plot b) Adds
What does the legend labels to the axes c) Adds a
51
function do in MATLAB? legend to the plot d) Saves the
plot
Which command is used
a) save() b) print() c) export()
52 to save a plot as an
d) saveas()
image file?
Which command is used
a) solve() b) roots() c) fsolve()
53 to solve algebraic
d) all of the above
equations in MATLAB?
What is the syntax to a) solve('eq1', 'eq2') b)
54 solve simultaneous solve([eq1, eq2]) c) solve(eq1,
equations in MATLAB? eq2) d) solve{'eq1', 'eq2'}
Which function is used
a) solve() b) roots() c) poly()
55 to find the roots of a
d) fsolve()
polynomial equation?
How do you define
a) sym() b) syms() c) symbolic()
56 symbolic variables for
d) define()
equations in MATLAB?
a) Solves linear equations b)
What does the Solves nonlinear equations c)
57
fsolve() function do? Finds the determinant d)
Computes eigenvalues
How do you solve a
a) roots([a, b, c]) b) solve([a, b,
quadratic equation
58 c]) c) poly([a, b, c]) d) quad([a,
using coefficients in
b, c])
MATLAB?
What is the output of
a) x = 2 b) x = -2 c) x = ±2 d) x
59 solve('x^2 - 4 =
=0
0')?
Students Name: _____________________________ SRN: ____________________
REVA University
School of Mechanical Engineering
MCQ Questions on MAT Lab
Q.NO. Question Option Marks
Which MATLAB function
a) ode45() b) solve() c) diff()
60 is used to solve
d) integrate()
differential equations?
How do you find the
a) det(A) b) solve(A) c) roots(A)
61 determinant of a matrix
d) inv(A)
in MATLAB?
a) Solves linear systems of
What does the equations b) Solves nonlinear
62 linsolve() function systems of equations c) Finds
do? eigenvalues d) Computes the
inverse of a matrix
Which operator is used
for element-wise
63 a) b) . c) x d) /
multiplication in
MATLAB?
a) Creates a range of values b)
What does the : Performs matrix division c) Adds
64
operator do in MATLAB? two matrices d) Multiplies two
matrices
Which operator is used
65 for matrix multiplication a) b) . c) x d) /
in MATLAB?
a) Assigns a value b) Compares
What does the == two values for equality c)
66
operator do in MATLAB? Multiplies two values d) Divides
two values
How do you perform
67 element-wise division in a) / b) ./ c) \\ d) .\\
MATLAB?
Which operator is used
to calculate the a) mod() b) rem() c) % d)
68
remainder after Both a and b
division?
What does the ~
a) Logical NOT b) Logical AND
69 operator represent in
c) Logical OR d) Logical XOR
MATLAB?
How do you perform
70 matrix left division in a) / b) \\ c) ./ d) .\\
MATLAB?
Which function is used
a) surf() b) plot3() c) mesh()
71 to create a 3D surface
d) contour()
plot?
How do you create a a) scatter() b) plot() c) bar()
72
scatter plot in MATLAB? d) pie()
a) Creates a 3D surface plot b)
What does the
Creates a contour plot c) Creates
73 contour() function do
a bar graph d) Creates a
in MATLAB?
histogram
Students Name: _____________________________ SRN: ____________________
REVA University
School of Mechanical Engineering
MCQ Questions on MAT Lab
Q.NO. Question Option Marks
Which function is used
a) hist() b) bar() c) scatter()
74 to create a histogram in
d) pie()
MATLAB?
a) To create a pie chart b) To
What is the purpose of
create a bar graph c) To create a
75 the pie() function in
scatter plot d) To create a line
MATLAB?
plot
Which function is used a) plot3() b) surf() c) mesh()
76
to create a 3D line plot? d) contour()
How do you create a
a) loglog() b) semilogx() c)
77 logarithmic plot in
semilogy() d) All of the above
MATLAB?
a) Creates a 3D mesh plot b)
What does the mesh() Creates a 2D line plot c) Creates a
78
function do in MATLAB? bar graph d) Creates a scatter
plot
What is the output of
a) 8 b) 53 c) Error d)
79 disp(5+3) in
Undefined
MATLAB?
What does the
a) [2, 2] b) [1, 4] c) [4, 1] d)
80 command size([1,
Error
2; 3, 4]) return?
What is the result of
81 length([1, 2, 3; a) 2 b) 3 c) 6 d) Error
4, 5, 6])?
a) A 3x2 matrix of zeros b) A 2x3
What does zeros(3,
82 matrix of zeros c) A 3x3 matrix of
2) produce?
zeros d) Error
a) Image processing b) System
What is Simulink modeling and simulation c)
83
primarily used for? Database management d) Web
development
Which command is used
a) openSimulink b) simulink c)
84 to open Simulink in
startSimulink d) launchSimulink
MATLAB?
What is the purpose of a) To generate signals b) To
85 the "Scope" block in display signals c) To store data
Simulink? d) To process signals
a) Drag and drop from the library
How do you add a block b) Use the "Add Block" command
86
to a Simulink model? c) Import from MATLAB d) All of
the above
Which block is used to a) Signal Generator b) Sine Wave
87 generate a sine wave in c) Function Block d) Waveform
Simulink? Generator
What is the purpose of a) To differentiate a signal b) To
88 the "Integrator" block in integrate a signal c) To amplify a
Simulink? signal d) To filter a signal
Students Name: _____________________________ SRN: ____________________
REVA University
School of Mechanical Engineering
MCQ Questions on MAT Lab
Q.NO. Question Option Marks
a) Click "Run" in the toolbar b)
How do you run a
89 Press F5 c) Use the "sim"
simulation in Simulink?
command d) All of the above
a) Combines multiple signals into
What does the "Mux" one b) Splits one signal into
90
block do in Simulink? multiple c) Filters a signal d)
Amplifies a signal
Which block is used to
a) Gain b) Feedback c) Sum
91 create a feedback loop
d) Transfer Function
in Simulink?
a) To solve algebraic equations b)
What is the purpose of
To compute the simulation results
92 the "Solver" in
c) To generate plots d) To
Simulink?
optimize the model
a) Image processing b) Physical
What is Simscape system modeling c) Database
93
primarily used for? management d) Web
development
Which MATLAB a) simscape b) simulink c)
94 command is used to openSimscape d)
open Simscape? launchSimscape
a) Configures simulation settings
What does the "Solver b) Solves algebraic equations c)
95 Configuration" block in Provides initial conditions for
Simscape do? simulation d) Connects physical
networks
Which block is used to a) Electrical Source b) Simulink
96 model electrical circuits Source c) Simscape Electrical d)
in Simscape? Circuit Designer
a) Converts Simulink signals to
physical signals b) Converts
What is the purpose of
physical signals to Simulink signals
97 the "PS-Simulink
c) Converts electrical signals to
Converter" block?
mechanical signals d) Converts
Simulink signals to electrical signals
a) Drag and drop from the
How do you add a
Simscape library b) Use the "Add
98 Simscape block to a
Block" command c) Import from
Simulink model?
MATLAB d) All of the above
Which block is used to a) Mechanical Source b)
99 model mechanical Simscape Multibody c) Simulink
systems in Simscape? Mechanical d) Physical Network
What does the "Thermal a) Electrical systems b) Hydraulic
100 Liquid" library in systems c) Thermal-fluid systems
Simscape represent? d) Mechanical systems
Which block is used to a) Material Properties b) Physical
define the properties of Properties c) Domain Properties
a material in Simscape? d) Custom Properties
Students Name: _____________________________ SRN: ____________________
REVA University
School of Mechanical Engineering
MCQ Questions on MAT Lab
Q.NO. Question Option Marks
a) Provides basic blocks for
What is the purpose of modeling physical systems b)
the "Foundation Stores simulation results c)
Library" in Simscape? Configures solver settings d)
Connects Simulink and Simscape
Students Name: _____________________________ SRN: ____________________