MCQ Bank
The ________ command calculates the eigen value of a ________ matrix.
- A) eigen, square
- B) value, rectangular
- C) eig, square
- D) eig, rectangular
What MATLAB function is used to find the inverse of a matrix?
- A) eig()
- B) eye()
- C) inv()
- D) inverse()
If we use [P, D] = eig(B), P determines ______ and D determines _________.
- A) square matrix, rectangular matrix
- B) rectangular matrix, square matrix
- C) eigen values, eigen vectors
- D) eigen vectors, eigen values
________ command can be used for the solution of system of linear equations.
- A) xlim
- B) label
- C) eig
- D) rref
_________ command calculates the inverse of the matrix A.
- A) eig(A)
- B) none of these
- C) inv(A)
- D) sym(A)
Using MATLAB, solution of system of linear equations is obtained by _____________ command .
- A) solve
- B) sym
- C) inv
- D) eig
To calculate the reduced echelon form of a matrix E=[0 1 3 4; 2 4 1 5; 6 1 8 6], we will write __________ in MATLAB.
- A) rref
- B) eig(E)
- C) eig
- D) rref(E)
_________ command calculates the eigen value of the square matrix M.
- A) inv(M)
- B) none of these
- C) eig(M)
- D) sym(M)
What MATLAB function is used to find the determinant of a matrix?
- A) determinant()
- B) rank()
- C) trace()
- D) det()
To enter system of equations 2x+3y=4, 3x-4y=8 into MATLAB as an (augmented) matrix we will write ____________ .
- A) b=[4; 8]; Ab=[[2 3; 3 -4] b]
- B) A=[2 3; 3 -4]; b=[4; 8]; Ab=[A b]
- C) All of these
- D) Ab=[2 3 4; 3 -4 8]
To solve the system of equations 2x+3y=4, 3x-4y=8, we will write _________________ into MATLAB.
- A) b=[4; 8]; Ab=[[2 3; 3 -4] b]; rref(Ab)
- B) rref([2 3 4; 3 -4 8])
- C) All of these
- D) A=[2 3; 3 -4]; b=[4; 8]; Ab=[A b]; rref(Ab)
________ command provides reduced echelon form of a matrix A.
- A) eig
- B) rref(A)
- C) rref
- D) eig(A)
The clc command in MATLAB is used to -------------
- A) clean the desktop
- B) save the existing mfile
- C) None of these
- D) clear the command window
Which of these is the way to access the first element in a vector V?
- A) V(0)
- B) V(: , 0)
- C) V
- D) V(1)
If V=1:3:12 is a vector, then V(3)= -----?
- A) 8
- B) 4
- C) 7
- D) 10
What is the default increment value in a FOR loop?
- A) 3
- B) 2
- C) 0
- D) 1
Once the control variable in FOR loops is outside of the specified range, the loop will --------------
- A) stop repeating
- B) countinue repeating
- C)
- D)
If v = 1:2:10 is a vector, then length(v)= ----?
- A) 5
- B) 2
- C) 7
- D) 10
For loops are ---------- loops.
- A) counter based
- B) conditional based
- C)
- D)
To add a comment to the m-file in MATLAB, __________ sign is used.
- A) ;
- B) %
- C) &
- D) #