.Modelica.Math.Matrices

Information

Library content

This library provides functions operating on matrices. Below, the functions are ordered according to categories and a typical call of the respective function is shown. Most functions are solely an interface to the external LAPACK library.

Note: A' is a short hand notation of transpose(A):

Basic Information

Linear Equations

Matrix Factorizations

Matrix Properties

Matrix Exponentials

Matrix Equations

Matrix Manipulation

See also

Vectors

Contents

Name Description
 Examples Examples demonstrating the usage of the Math.Matrices functions
 toString Convert a matrix into its string representation
 isEqual Compare whether two Real matrices are identical
 solve Solve real system of linear equations A*x=b with a b vector (Gaussian elimination with partial pivoting)
 solve2 Solve real system of linear equations A*X=B with a B matrix (Gaussian elimination with partial pivoting)
 leastSquares Solve linear equation A*x = b (exactly if possible, or otherwise in a least square sense; A may be non-square and may be rank deficient)
 leastSquares2 Solve linear equation A*X = B (exactly if possible, or otherwise in a least square sense; A may be non-square and may be rank deficient)
 equalityLeastSquares Solve a linear equality constrained least squares problem
 LU LU decomposition of square or rectangular matrix
 LU_solve Solve real system of linear equations P*L*U*x=b with a b vector and an LU decomposition (from LU(..))
 LU_solve2 Solve real system of linear equations P*L*U*X=B with a B matrix and an LU decomposition (from LU(..))
 eigenValues Return eigenvalues and eigenvectors for a real, nonsymmetric matrix in a Real representation
 eigenValueMatrix Return real valued block diagonal matrix J of eigenvalues of matrix A (A=V*J*Vinv)
 singularValues Return singular values and left and right singular vectors
 QR Return the QR decomposition of a square matrix with optional column pivoting (A(:,p) = Q*R)
 hessenberg Return upper Hessenberg form of a matrix
 realSchur Return the real Schur form (rsf) S of a square matrix A, A=QZ*S*QZ'
 cholesky Return the Cholesky factorization of a symmetric positive definite matrix
 balance Return a balanced form of matrix A to improve the condition of A
 balanceABC Return a balanced form of a system [A,B;C,0] to improve its condition by a state transformation
 trace Return the trace of matrix A, i.e., the sum of the diagonal elements
 det Return determinant of a matrix (computed by LU decomposition; try to avoid det(..))
 inv Return inverse of a matrix (try to avoid inv(..))
 rank Return rank of a rectangular matrix (computed with singular values)
 conditionNumber Return the condition number norm(A)*norm(inv(A)) of a matrix A
 rcond Return the reciprocal condition number of a matrix
 norm Return the p-norm of a matrix
 frobeniusNorm Return the Frobenius norm of a matrix
 nullSpace Return the orthonormal nullspace of a matrix
 exp Return the exponential of a matrix by adaptive Taylor series expansion with scaling and balancing
 integralExp Return the exponential and the integral of the exponential of a matrix
 integralExpT Return the exponential, the integral of the exponential, and time-weighted integral of the exponential of a matrix
 continuousLyapunov Return solution X of the continuous-time Lyapunov equation X*A + A'*X = C
 continuousSylvester Return solution X of the continuous-time Sylvester equation A*X + X*B = C
 continuousRiccati Return solution X of the continuous-time algebraic Riccati equation A'*X + X*A - X*B*inv(R)*B'*X + Q = 0 (care)
 discreteLyapunov Return solution X of the discrete-time Lyapunov equation A'*X*A + sgn*X = C
 discreteSylvester Return solution of the discrete-time Sylvester equation A*X*B + sgn*X = C
 discreteRiccati Return solution of discrete-time algebraic Riccati equation A'*X*A - X - A'*X*B*inv(R + B'*X*B)*B'*X*A + Q = 0 (dare)
 sort Sort the rows or columns of a matrix in ascending or descending order
 flipLeftRight Flip the columns of a matrix in left/right direction
 flipUpDown Flip the rows of a matrix in up/down direction
 LAPACK Interface to LAPACK library (should usually not directly be used but only indirectly via Modelica.Math.Matrices)
 Utilities Utility functions that should not be directly utilized by the user

Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f