OKPEDIA MATLAB EN MATRICE

How to find the determinant of a matrix in Matlab and Octave

To calculate the determinant of a square matrix in Matlab and Octave, use the function det()

det(x)

The parameter x is a square matrix.

The function returns the determinant of the matrix as output.

Example

Define a 3x3 square matrix with three rows and three columns.

>> M = [ 1 4 3 ; 2 9 5 ; 4 7 8 ]
M =
1 4 3
2 9 5
4 7 8

Find the determinant of the matrix using the function det()

>> det(M)
ans = -13.000

The determinant of the matrix is -13

https://how.okpedia.org/en/matlab/how-to-find-the-determinant-of-a-matrix-in-matlab-and-octave


Report an error or share a suggestion to enhance this page


Matrix in Matlab/Octave


FacebookTwitterLinkedinLinkedin