Matlab Basic Math Operations Quiz

Matlab
0 Passed
0% acceptance

35 essential questions covering MATLAB's core arithmetic, order of operations, and fundamental mathematical functions.

35 Questions
~70 minutes
1

Question 1

What is the result of the expression '5 + 3 * 2' in MATLAB?

A
11
B
16
C
10
D
13
2

Question 2

Which symbol is used for exponentiation (raising a number to a power) in MATLAB?

A
^
B
**
C
pow
D
exp
3

Question 3

How do you calculate the square root of 25 in MATLAB?

matlab
x = 25;
A
sqrt(x)
B
root(x)
C
sqr(x)
D
x // 2
4

Question 4

What is the value of the built-in constant 'pi' in MATLAB (displayed to 4 decimal places)?

A
3.1416
B
3.14
C
22/7
D
3.14159
5

Question 5

Which expression correctly calculates 'e' raised to the power of 2?

A
exp(2)
B
e^2
C
pow(e, 2)
D
ln(2)
6

Question 6

What is the result of '10 / 2 * 5'?

A
25
B
1
C
10
D
2.5
7

Question 7

How can you force addition to happen before multiplication in the expression '3 * 4 + 2'?

A
3 * (4 + 2)
B
(3 * 4) + 2
C
3 * [4 + 2]
D
add(4, 2) * 3
8

Question 8

What does the function 'round(3.6)' return?

A
4
B
3
C
3.5
D
3.6
9

Question 9

What is the result of '2 ^ 3 ^ 2' in MATLAB?

A
64
B
512
C
12
D
Error
10

Question 10

Which function returns the absolute value of -10?

A
abs(-10)
B
absolute(-10)
C
mag(-10)
D
val(-10)
11

Question 11

What is the result of 'sin(pi/2)'?

A
1
B
0
C
-1
D
0.5
12

Question 12

Which operator is used for matrix left division (solving linear systems)?

A
\
B
/
C
%
D
div
13

Question 13

What is the output of 'mod(10, 3)'?

A
1
B
3
C
0
D
3.3333
14

Question 14

How do you represent the square root of -1 in MATLAB?

A
1i or 1j
B
sqrt(-1)
C
Both A and B
D
complex(1)
15

Question 15

What is the result of 'fix(3.9)'?

A
3
B
4
C
3.5
D
Error
16

Question 16

Which expression calculates the log base 10 of 100?

A
log10(100)
B
log(100)
C
ln(100)
D
log(100, 10)
17

Question 17

What happens if you divide a number by zero in MATLAB (e.g., '1 / 0')?

A
Returns 'Inf' (Infinity)
B
Throws a syntax error
C
Returns 'NaN' (Not a Number)
D
Crashes the program
18

Question 18

What is the result of 'ceil(2.1)'?

A
3
B
2
C
2.5
D
2.1
19

Question 19

Which code snippet calculates the hypotenuse of a right triangle with sides 3 and 4?

matlab
a = 3; b = 4;
A
hypot(a, b)
B
sqrt(a^2 + b^2)
C
Both A and B
D
c = a + b
20

Question 20

What is the result of 'sign(-5)'?

A
-1
B
1
C
0
D
-5
21

Question 21

Which operator has the lowest precedence in MATLAB?

A
+ and -
B
* and /
C
^
D
()
22

Question 22

What is the result of '2 * 3 ^ 2'?

A
18
B
36
C
12
D
64
23

Question 23

How do you calculate the tangent of 45 degrees?

A
tand(45)
B
tan(45)
C
tan(pi/4)
D
Both A and C
24

Question 24

What does 'rem(10, 3)' return?

A
1
B
3
C
0.333
D
10
25

Question 25

What is the result of 'floor(-2.1)'?

A
-3
B
-2
C
-2.5
D
-2.1
26

Question 26

Which expression is equivalent to 'sqrt(x)'?

A
x ^ 0.5
B
x ^ 2
C
x / 2
D
exp(x)
27

Question 27

What is the result of 'exp(1)'?

A
2.7183
B
1
C
0
D
10
28

Question 28

What is the result of '0 / 0'?

A
NaN
B
Inf
C
0
D
Error
29

Question 29

Which function computes the factorial of a number n?

A
factorial(n)
B
fact(n)
C
n!
D
prod(1:n)
30

Question 30

What is the result of '-5 ^ 2'?

A
-25
B
25
C
-10
D
Error
31

Question 31

Which function converts radians to degrees?

A
rad2deg
B
deg2rad
C
degrees
D
angle
32

Question 32

What is the result of 'log2(8)'?

A
3
B
2
C
4
D
0.903
33

Question 33

How do you calculate the inverse sine (arcsin) of 0.5 in radians?

A
asin(0.5)
B
sininv(0.5)
C
asind(0.5)
D
invsin(0.5)
34

Question 34

What is the result of 'nthroot(27, 3)'?

A
3
B
9
C
27
D
Error
35

Question 35

What is the result of '3 + 4 * 5 / 2'?

A
13
B
17.5
C
10
D
35

QUIZZES IN Matlab