Code covered by the BSD License  

Highlights from
Multiple same-size linear solver

Be the first to rate this file! 10 Downloads (last 30 days) File Size: 4.74 KB File ID: #24260

Multiple same-size linear solver

by Bruno Luong

 

25 May 2009 (Updated 26 May 2010)

Solve multiple systems of linear equations of the same size

| Watch this File

File Information
Description

Sometime we need to solve a bunch of small linear (least-square) systems of the same size. This function can accomplish this task conveniently.

The system matrix and RHS are passed as 3D arrays.

Furthermore, calling syntax can support two simplifications:
- same RHS for all systems; or
- single RHS for each system.

Followed an idea from Tim Davis (using sparse)

Acknowledgements
This submission has inspired the following:
Inversion every 2D slice for arbitrary Multi-dimension array. , Free-knot spline approximation
MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
27 Apr 2011 Cole Van Vlack

Hi Bruno,

I tried your function on a large array (eg. 5*5*1000000), it occupies too much memory. It will take at least 5 times memory as the initial data package. And most of the memory cost is to store the sparse indexes. Is there any way to reduce the memory consuming? Thanks!

Cheers,
Xiaodong

Please login to add a comment or rating.
Updates
27 May 2009

Minor typo correction

11 Aug 2009

- A wrapper to call with arrays that loop on the third dimension
- Multi matrix-products

26 May 2010

Correct miss-leading MultiProd H1 line

Tag Activity for this File
Tag Applied By Date/Time
linear equations Bruno Luong 26 May 2009 14:41:07
linear system Bruno Luong 26 May 2009 14:41:07
least square Bruno Luong 26 May 2009 14:41:07

Contact us at files@mathworks.com