MATLAB - Determinant of a Matrix

Advertisements


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

Example

Create a script file with the following code:

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

When you run the file, it displays the following result:

a =
     1     2     3
     2     3     4
     1     2     5
ans =
    -2


Advertisements
Advertisements