invReturn inverse of a matrix (try to avoid inv(..)) |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
invA = Matrices.inv(A);
This function returns the inverse of matrix A, i.e., A*inv(A) = identity(size(A,1)) computed by a LU decomposition with row pivoting. Usually, this function should not be used, because there are nearly always better numerical algorithms as by computing directly the inverse. Example:
Use x = Matrices.solve(A,b) to solve the linear equation A*x = b, instead of computing the solution by x = inv(A)*b, because this is much more efficient and much more reliable.
A |
Type: Real[:,size(A, 1)] |
---|
invA |
Type: Real[size(A, 1),size(A, 2)] Description: Inverse of matrix A |
---|