|
Department of Engineering |
|
|
Next: Matrix functions
Up: Matrix operations
Previous: Picking sub-matrices
Matrix operators work much as expected. In order of precedence they are
listed in table 1.
Table 1:
Matrix operators
' |
transpose |
^ |
power |
* |
multiplication |
/ |
right division |
\ |
left division |
+ |
addition |
- |
subtraction |
|
Note that the normal matrix rules apply, so matrices need to be appropriately
shaped. Using .* (note the extra dot) multiples corresponding
elements together. ./
and .\
work in a similar way. .^
raises each element to the given power (rather than the matrix as a whole).