MATLAB: how to calculate the 'determinant' of a matrix N*N in MATLAB [closed]
A(N,N)
: matrix
First, i want to give the matrix from my keyboard. Then calculate the determinant of A
Thanks!
You can define the matrix like so (semicolons can be used for line breaks)
A = [1 2 3; 4 5 6; 7 8 0]
A =
1 2 3
4 5 6
7 8 0
Then you calculate the determinate by using DET
det(A)
ans =
27
A = [ 1 2 3 4;
5 6 7 8;
1 2 3 4;
5 6 7 8];
det(A)
精彩评论