mmtimes: matrix chain product
Version 1.5.0.0 (2.81 KB) by
Bruno Luong
Return matrix chain product P = M1*M2* ... *Mn
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.
Cite As
Bruno Luong (2026). mmtimes: matrix chain product (https://uk.mathworks.com/matlabcentral/fileexchange/27950-mmtimes-matrix-chain-product), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2010a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- AI and Statistics > Statistics and Machine Learning Toolbox > Probability Distributions and Hypothesis Tests > Pseudorandom and Quasirandom Number Generation >
Find more on Pseudorandom and Quasirandom Number Generation in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
