What is the output of the following code? [code]det([1 2 3; 4 5 6; 7 8 9])[/code]

Thành Nguyễn

New member
What is the output of the following code?
Code:
det([1 2 3; 4 5 6; 7 8 9])
A. Error
B.. 0
C. -0
D. A very small value
 
Answer: d
Explanation: Any determinant in MATLAB is calculated using the LU decomposition method which eventually results in rounding off errors in case of singular matrices. Since the given matrix is singular, it will give a very small value.
 

Tìm kiếm

Back
Top