Be the first to rate this file! 9 Downloads (last 30 days) File Size: 3.03 KB File ID: #27762

Small size linear solver

by

 

27 May 2010 (Updated )

Linear solver of multiple 2x2 and 3x3 systems

| Watch this File

File Information
Description

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.

Acknowledgements

Mtimesx Fast Matrix Multiply With Multi Dimensional Support inspired this file.

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
10 Aug 2010 James Tursa

FYI, I just uploaded a new version of MTIMESX that does small matrix multiplies (first two dimensions <= 4) with inline code in 'SPEED' mode. This runs faster than the previous version.

29 May 2010 Yvan Lengwiler

Bruno. Please ignore my previous comment. I overlooked that another MathCentral submission is required for your program to run.

29 May 2010 Yvan Lengwiler

Bruno, I tried to run your benchmark file (bench_inv2inv3.m) but ended up with an error:
??? Undefined function or method 'mtimesx' ...
A file seems to be missing.

Updates
28 May 2010

Make sure calling MTIMESX with SPEED option
Modification of H1 lines

Contact us