Download Symbolic Math Toolbox User's Guide

Transcript
Arithmetic Operations
Purpose
Perform arithmetic operations on symbols.
Syntax
A+B
A–B
A*B A.*B
A\B A.\B
A/B A./B
A^B A.^B
A' A.'
Description
+
Matrix addition. A + B adds A and B. A and B must have the same
dimensions, unless one is scalar.
–
Subtraction. A – B subtracts B from A. A and B must have the same
dimensions, unless one is scalar.
*
Matrix multiplication. 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.
.*
Array multiplication. A.*B is the entry-by-entry product of A and B. A
and B must have the same dimensions, unless one is scalar.
\
Matrix left division. 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.
.\
Array left division. 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.
/
Matrix right division. 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.
./
Array right division. 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.
2
Arithmetic Operations
2-8