Version (1.73 KB) by ja
Multiply many small matricies quickly
Updated 21 Jul 2017

View License

Intended use is for a large array of small matrices that need to be multiplied together. For example, having 1000 4x3 matrices and 1000 3x7 matrices you may want to create the resulting 1000 4x7 matrices from multiplying them. The 'brute force' method for this is to create a for loop from 1 to 1000 and multiply each one individually. With this function, instead, the for loop is over the dimensions of the matrices. I.E. in this case a nested for loop of 1 to 4 and of 1 to 7, totaling 28 iterations instead of 1000.

Cite As

ja (2024). ndmult(B,C,d) (https://www.mathworks.com/matlabcentral/fileexchange/63826-ndmult-b-c-d), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Linear Algebra in Help Center and MATLAB Answers

Inspired: ndinv(B,d)

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes