English 中文(简体)
Matlab-Matrix - Matrix Determinant
  • 时间:2024-09-17

Matlab-Matrix - Determinant


Previous Page Next Page  

Determinant of a matrix is calculated by using the det function of MATLAB. For example, the determinant of a matrix A is given by det(A).

Example

Consider following example for calculating the determinant of a matrix −


a = [ 1 2 3; 2 3 4; 1 2 5];
test = det(a)

Output

The code on execution in MATLAB is as follows −


>> a = [ 1 2 3; 2 3 4; 1 2 5];
test = det(a)

test =

   -2 
>>
Advertisements