0% found this document useful (0 votes)
6 views

MATLAB_MCQ_Practice

The document contains multiple-choice questions (MCQs) related to MATLAB computing tools for mathematics. It covers various commands and functions in MATLAB, including clearing variables, plotting graphs, and performing matrix operations. Each question is followed by the correct answer, with a particular emphasis on the use of the ':' operator for creating ranges.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

MATLAB_MCQ_Practice

The document contains multiple-choice questions (MCQs) related to MATLAB computing tools for mathematics. It covers various commands and functions in MATLAB, including clearing variables, plotting graphs, and performing matrix operations. Each question is followed by the correct answer, with a particular emphasis on the use of the ':' operator for creating ranges.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

MATLAB Computing Tools for Mathematics - MCQs

1. Which command is used to clear all variables from the workspace?

a) reset

b) clear all

c) clc

d) remove

Answer: b

2. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

3. Which of the following is used to perform element-wise multiplication in MATLAB?

a) *

b) .*

c) &

d) /

Answer: b

4. What is the output of length([2 4 6 8])?

a) 4

b) 2

c) 1

d) 3

Answer: a
5. Which command plots a graph in MATLAB?

a) draw()

b) figure()

c) plot()

d) graph()

Answer: c

6. Which command is used to solve symbolic equations?

a) solve()

b) roots()

c) equation()

d) symsolve()

Answer: a

7. What will eye(3) return?

a) A 3x3 matrix of zeros

b) A 3x3 matrix of ones

c) A 3x3 identity matrix

d) A scalar value

Answer: c

8. Which function is used to find the determinant of a matrix?

a) inv()

b) det()

c) deter()

d) solve()

Answer: b

9. What does the size(A) function return?


a) Total number of elements in A

b) Dimensions of matrix A

c) Data type of A

d) None

Answer: b

10. Which command is used to create a row vector from 1 to 10 with step size 2?

a) 1:10:2

b) 1,2,10

c) 1:2:10

d) 1 to 10 by 2

Answer: c

11. Which of the following is used to generate random numbers in MATLAB?

a) rand()

b) random()

c) rng()

d) generate()

Answer: a

12. Which function returns the inverse of a matrix?

a) inv()

b) det()

c) inverse()

d) rev()

Answer: a

13. What will zeros(2,3) return?

a) A 3x2 zero matrix


b) A 2x3 zero matrix

c) A 2x2 matrix with zeros

d) A scalar 0

Answer: b

14. In MATLAB, the operator '^' is used for:

a) Division

b) Square root

c) Exponentiation (power)

d) Multiplication

Answer: c

15. Which keyword is used to define a function in MATLAB?

a) func

b) define

c) function

d) script

Answer: c

16. How to comment a single line in MATLAB?

a) //

b) #

c) --

d) %

Answer: d

17. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value
c) Defines function

d) Terminates loop

Answer: a

18. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

19. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

20. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

21. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function
d) Terminates loop

Answer: a

22. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

23. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

24. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

25. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop
Answer: a

26. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

27. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

28. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

29. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a
30. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

31. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

32. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

33. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

34. What does the ':' operator do in MATLAB?


a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

35. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

36. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

37. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

38. What does the ':' operator do in MATLAB?

a) Creates a range
b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

39. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

40. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

41. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

42. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value
c) Defines function

d) Terminates loop

Answer: a

43. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

44. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

45. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

46. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function
d) Terminates loop

Answer: a

47. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

48. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

49. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

50. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop
Answer: a

51. What does the ':' operator do in MATLAB?

a) Creates a range

b) Assigns value

c) Defines function

d) Terminates loop

Answer: a

You might also like