mmtimes: matrix chain product
by Bruno Luong
19 Jun 2010
(Updated 16 Aug 2010)
Return matrix chain product P = M1*M2* ... *Mn
|
Watch this File
|
| File Information |
| Description |
Because the matrix multiplication is associative; the product can be carried with different order, leading to the same result up to round-off error, MMTIMES usings "optimal" order of binary product to reduce the computational effort (probably accuracy is also improved)
The function assumes the cost of the product of (m x n) with (n x p) matrices is (m*n*p). This assumption is typically true for full matrix. |
| MATLAB release |
MATLAB 7.10 (2010a)
|
| Other requirements |
Matlab version that supports CELLFUN |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 21 Jun 2010 |
quicker top-down algorithm |
| 23 Jun 2010 |
Treat the case of scalar matrices |
| 16 Aug 2010 |
Update, optimal order can be input/output according to Ged Ridgway's suggestion |
|
Contact us at files@mathworks.com