Symbolic Math Toolbox | ![]() ![]() |
Perform arithmetic operations on symbols
Syntax
Description
+
A + B
adds A
and B
. A
and B
must have the same dimensions, unless one is scalar.-
A - B
subtracts B
from A
. A
and B
must have the same dimensions, unless one is scalar.*
A*B
is the linear algebraic product of A
and B
. The number of columns of A
must equal the number of rows of B
, unless one is a scalar..*
A.*B
is the entry-by-entry product of A
and B
. A
and B
must have the same dimensions, unless one is scalar.\
X = A\B
solves the symbolic linear equations A*X=B
. Note that A\B
is roughly equivalent to inv(A)*B
. Warning messages are produced if X
does not exist or is not unique. Rectangular matrices A
are allowed, but the equations must be consistent; a least squares solution is not computed..\
A.\B
is the matrix with entries B(i,j)/A(i,j)
. A
and B
must have the same dimensions, unless one is scalar./
X=B/A
solves the symbolic linear equation X*A=B
. Note that B/A
is the same as (A.'\B.').'
. Warning messages are produced if X
does not exist or is not unique. Rectangular matrices A
are allowed, but the equations must be consistent; a least squares solution is not computed../
A./B
is the matrix with entries A(i,j)/B(i,j)
. A
and B
must have the same dimensions, unless one is scalar.^
X^P
raises the square matrix X
to the integer power P
. If X
is a scalar and P
is a square matrix, X^P
raises X
to the matrix power P
, using eigenvalues and eigenvectors. X^P
, where X
and P
are both matrices, is an error..^
A.^B
is the matrix with entries A(i,j)^B(i,j)
. A
and B
must have the same dimensions, unless one is scalar.'
A
is complex, A'
is the complex conjugate transpose..'
A.'
is the real transpose of A. A.'
does not conjugate complex entries.Examples
See Also
![]() | Functions -- Alphabetical List | ccode | ![]() |