mmtimes: matrix chain product

版本 1.5.0.0 (2.8 KB) 作者: Bruno Luong
Return matrix chain product P = M1*M2* ... *Mn
1.1K 次下载
更新时间 2010/8/16

查看许可证

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.

引用格式

Bruno Luong (2024). mmtimes: matrix chain product (https://www.mathworks.com/matlabcentral/fileexchange/27950-mmtimes-matrix-chain-product), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.5.0.0

Update, optimal order can be input/output according to Ged Ridgway's suggestion

1.3.0.0

Treat the case of scalar matrices

1.1.0.0

quicker top-down algorithm

1.0.0.0