1. In MATLAB, a matrix is created using:
(A) Square brackets
(B) Curly braces
(C) Parentheses
(D) Angle brackets
2. Element-wise multiplication of two matrices in MATLAB is done using:
(A) *
(B) *
(C) /
(D) /
3. Matrix multiplication in MATLAB is performed using:
(A) *
(B) *
(C) /
(D) \
4. Transpose of a matrix is computed using:
(A) ' (apostrophe)
(B) ’
(C) ~
(D) ^
5. The determinant of a matrix in MATLAB is found using:
(A) det()
(B) rank()
(C) inv()
(D) eig()
6. The inverse of a matrix is computed using:
(A) inv()
(B) det()
(C) rank()
(D) norm()
7. The rank of a matrix is obtained using:
(A) rank()
(B) det()
(C) eig()
(D) inv()
8. Eigenvalues of a matrix are found using:
(A) eig()
(B) inv()
(C) det()
(D) rank()
9. To solve a linear system of equations Ax = b, MATLAB uses:
(A) x = A\b
(B) x = A/b
(C) x = inv(A) * b only
(D) x = b/A
10. Zeros matrix of size m×n is created using:
(A) zeros(m,n)
(B) ones(m,n)
(C) eye(m,n)
(D) rand(m,n)
11. Identity matrix of size n is created using:
(A) eye(n)
(B) ones(n)
(C) zeros(n)
(D) diag(n)
12. A matrix of ones of size m×n is created using:
(A) ones(m,n)
(B) zeros(m,n)
(C) eye(m,n)
(D) rand(m,n)
13. To extract a submatrix, MATLAB uses:
(A) Parentheses with row and column indices
(B) Curly braces
(C) Square brackets
(D) Angle brackets
14. Element-wise division is done using:
(A) /
(B) /
(C) \
(D) *
15. Element-wise power of a matrix is done using:
(A) ^
(B) ^
(C) *
(D) **
16. Scripts in MATLAB are saved with extension:
(A) m
(B) mat
(C) txt
(D) fig
17. Functions in MATLAB are defined using:
(A) function keyword
(B) def keyword
(C) fun keyword
(D) script keyword
18. A MATLAB script can be executed by:
(A) Typing its name in command window
(B) Using run button
(C) Both A and B
(D) None of the above
19. Loops in MATLAB are created using:
(A) for and while
(B) do-while only
(C) foreach only
(D) repeat-until
20. Conditional statements in MATLAB include:
(A) if, elseif, else
(B) switch
(C) Both A and B
(D) loop only
21. MATLAB indices start at:
(A) 1
(B) 0
(C) 1
(D) 2
22. Colon operator (:) is used for:
(A) Generating sequences
(B) Extracting submatrices
(C) Both A and B
(D) None of the above
23. The size of a matrix is obtained using:
(A) size()
(B) length()
(C) numel()
(D) dimensions()
24. Number of elements in a matrix is found using:
(A) numel()
(B) size()
(C) length()
(D) count()
25. To concatenate two matrices horizontally, you use:
(A) [A B]
(B) [A; B]
(C) [A,B]
(D) Both A and C
26. To concatenate two matrices vertically, you use:
(A) [A; B]
(B) [A B]
(C) [A,B]
(D) [A/B]
27. MATLAB supports complex numbers using:
(A) i or j
(B) c or z
(C) x or y
(D) None
28. To generate random matrices, MATLAB uses:
(A) rand() or randi()
(B) ones()
(C) zeros()
(D) eye()
29. A MATLAB function can return:
(A) Single output
(B) Multiple outputs
(C) Both A and B
(D) No outputs
30. The main advantage of scripting in MATLAB is:
(A) Automating repetitive tasks
(B) Visualizing data
(C) Numerical computations
(D) All of the above