trace
Compute the trace of a matrix, the sum of the diagonal elements.
Syntax
R = trace(A)
Inputs
- A
- Dimension: matrix
Outputs
- R
- The trace.
Examples
R = trace([1,2,3;4,5,6;7,8,9])
R = 15
Discover new features and enhancements.
New to Activate? Learn the basics here.
Start using Activate with our interactive tutorials.
Learn about the components in Activate models.
Learn about modeling physical components.
Learn about modeling hydraulic systems with the Hydraulics (By Fluidon) library.
Learn about modeling electrical and electronic systems with Modelica and Spice.
Learn about modeling multibody dynamic systems.
Learn about modeling electromagnetic systems.
Learn how to set up, run, and troubleshoot simulations.
Discover options to review, display, and export results.
Learn about block libraries for building dynamic system models.
Explore the Extended Definitions, OML Guides, Block Library, API Guide and Glossary.
PDF file with in-depth information on key topics in the User's Guide.
OpenMatrix is a mathematical scripting language.
The Reference Guide contains documentation for all functions supported in the OpenMatrix language.
Returns a matrix with rows and columns of roughly equal magnitude.
Cholesky decomposition.
Compute the condition number of a matrix.
Return the complex conjugate.
Convolution of two vectors.
Compute 2D convolution.
Vector cross product.
Compute the matrix determinant.
Vector dot product.
Eigen decomposition.
Creates a fully populated matrix from sparse.
Compute the inverse matrix.
Hermitian matrix test.
Determines if an input is a matrix with sparse storage.
Determines if x is a square matrix.
Symmetric matrix test.
Kronecker matrix product.
Solve a linear system of equations.
LU decomposition.
Finds the number of non-zero values in a matrix.
Compute matrix and vector norms.
Compute the matrix pseudo-inverse.
QR decomposition.
Compute the rank of matrix A.
Compute the 1-norm estimate of the reciprocal condition number.
Schur decomposition.
Sparse matrix creation.
Sparse identity matrix creation.
Set non-zero matrix elements to 1.
Singular value decomposition.
Compute the trace of a matrix, the sum of the diagonal elements.
Matrix transpose.
Returns a lower triangular matrix.
Returns a upper triangular matrix.
Describes all of the blocks in the installed Activate library.
Key terms associated with the software.
Define shortcuts to common operations.
Explore the Extended Definitions, OML Guides, Block Library, API Guide and Glossary.
The Reference Guide contains documentation for all functions supported in the OpenMatrix language.
Compute the trace of a matrix, the sum of the diagonal elements.
Compute the trace of a matrix, the sum of the diagonal elements.
R = trace(A)
R = trace([1,2,3;4,5,6;7,8,9])
R = 15
(c) Altair Engineering, Inc. All rights reserved.