File Exchange

image thumbnail

Multiple same-size linear solver

version 1.3 (4.74 KB) by

Solve multiple systems of linear equations of the same size

8 Downloads

Updated

View License

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)

Comments and Ratings (5)

li haitao

John Yang

Thanks for this file, shedding light to me on this kind of problems!

Rajab Legnain

Hi Sir

It is early a great function.
Thanks for sharing.
Regards

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

Updates

1.3

Correct miss-leading MultiProd H1 line

1.2

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

1.1

Minor typo correction

MATLAB Release
MATLAB 7.8 (R2009a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video