You are here

Revision of Matrix Operators and Functions from Fri, 09/11/2009 - 20:46

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

The following table list matrix operators and functions that are supported by OpenMx. A blank value for the columns 'Implemented' or 'Passing Tests' indicates that the entry has been implemented or is passing the sample tests, respectively.

Operator nameR nameMx nameConformabilityImplemented/Passing Tests

Inversion
solve(A)A~r=cYes
Transpose
t(A)A'none Yes
Element powering
A ^ BA ^ BnoneYes
Matrix multiplication
A %*% BA * BcA=rbYes
Dot product
A * BA . BrA=rB and cA=c B Yes
Kronecker product
A %x% BA @ B-- Yes
Quadratic product1
A %&% BA & B cA=rB=cB Yes
Element division
A / BA % BrA=rB and cA=c B Yes
Addition
A + BA + BrA=rB and cA=c B Yes
Subtraction (binary)
A - BA - BrA=rB and cA=c BYes
Subtraction (unary)
- A- A--Yes
Horizontal adhesion
cbind(A,B,C)A | B | CrA=rBYes
Vertical adhesion
rbind(A,B,C) A _ B _ CcA=cBYes
Determinant
det(A)\det(A)-- Not implemented
Trace1
tr(A)\tr(A)--Yes
Sum
sum(A,B,C)\sum(A,B,C)--Yes
Product
prod(A,B,C)\prod(A,B,C)--Yes
Maximum
max(A,B,C)\max(A,B,C)--Yes
Minimum
min(A,B,C)\min(A,B,C)--Yes
Absolute value
abs(A)\abs(A) --Yes
Cosine
cos(A)\cos(A)--Yes
Hyperbolic cosine
cosh(A)\cosh(A)--Yes
Sine
sin(A)\sin(A)--Yes
Hyperbolic sine
sinh(A)\sinh(A)--Yes
Tangent
tan(A)\tan(A)--Yes
Hyperbolic tangent
tanh(A)\tanh(A)--Yes
Element Exponent
exp(A)\exp(A)--Yes
Element Natural Log
log(A)\ln(A)--Yes
Element Square Root
sqrt(A)\sqrt(A)--Yes

1 Support for this operation in the R frontend is provided by the OpenMx library. This operation is not defined by the R core library, so you will be unable to use it without loading the OpenMx library.