Quasar library for linear algebra routines. Please feel free and help me to extend this library.
linalg.q | Quasar library for linear algebra routines. |
Functions | |
inv | Computes the inverse of a squared matrix |
lsolve | Solve the linear system of equations A·X = B (where X is a vector) |
svd | Computation of a singular value decomposition (SVD). |
det | Determinant of a real-valued matrix |
logdet | Logarithm of the determinant of a real-valued matrix |
symsqrt | Computes the symmetric square root of a positive definite matrix |
pinv | Computes the pseudo-inverse of a matrix |
toeplitz | Computes a square toeplitz matrix |
wpolyfit | weighted polynomial fitting |
polyfit | polynomial fitting |
polyval | polynomial curve evaluation |
Logarithm of the determinant of a real-valued matrix
function y : scalar = logdet(A : mat)
The logdet evaluates the logarithm of the determinant of A by computing the sum of the logarithms of the eigenvalues of A, this results in some better numerical accuracy, especially in case the condition number of A is very high.
logdet = (A : mat) -> log(det(A))