Small size linear solver
Solve multiple (2x2) or (3x3) linear systems:
A(:,:,k)*X(:,:,k) = B(:,:,k) for k=1,2,...,N
The method used here is basic cofactor/determinant.
DISADVANTAGE: This method may be less accurate than Matlab backslash (using in for-loop) when the matrices are ill-conditioned.
ADVANTAGE: for a large number of systems - the speed-up is about 15-30 fold.
Cite As
Bruno Luong (2024). Small size linear solver (https://www.mathworks.com/matlabcentral/fileexchange/27762-small-size-linear-solver), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Mathematics > Sparse Matrices >
Tags
Acknowledgements
Inspired by: MTIMESX - Fast Matrix Multiply with Multi-Dimensional Support
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.