logabsdet

logabsdet(M)

Log of absolute value of determinant of real matrix. Equivalent to (log(abs(det(M))), sign(det(M))), but may provide increased accuracy and/or speed.

Examples

julia> M = [1 2; 3 4];
julia> logabsdet(M)
0.6931471805599453

This example calculates the log of the absolute value of the determinant of the matrix M.

julia> A = [2 -1 0; 0 3 1; 1 1 2];
julia> logabsdet(A)
1.791759469228055

Here, the function logabsdet is used to compute the log of the absolute value of the determinant of matrix A.

Common mistake example:

julia> B = [1 2 3; 4 5 6];
julia> logabsdet(B)
ERROR: MethodError: no method matching logabsdet(::Array{Int64,2})

In this example, the input B is not a square matrix. The logabsdet function can only be applied to square matrices, so ensure that the input matrix is of the correct shape.

See Also

Ac_ldiv_B, Ac_ldiv_Bc, Ac_mul_B, Ac_mul_Bc, Ac_rdiv_B, Ac_rdiv_Bc, At_ldiv_B, At_ldiv_Bt, At_mul_B, At_mul_Bt, At_rdiv_B, At_rdiv_Bt, A_ldiv_Bc, A_ldiv_Bt, A_mul_B!, A_mul_Bc, A_mul_Bt, A_rdiv_Bc, A_rdiv_Bt, Bidiagonal, cond, conv2, det, diag, diagind, diagm, diff, eig, eigvals, eigvecs, expm, eye, full, inv, isdiag, ishermitian, isposdef, isposdef!, issym, istril, istriu, logabsdet, logdet, lyap, norm, qrfact, rank, repmat, rot180, rotl90, rotr90, sortrows, sqrtm, SymTridiagonal, trace, Tridiagonal, tril, tril!, triu, triu!, writedlm,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: