Optimizing (Reducing run time) of a sparse matrix division

4 vues (au cours des 30 derniers jours)
Abdelrahman Ahmed
Abdelrahman Ahmed le 31 Mar 2022
Hi, so I have a sparse matrix as shown below:
[ap ae 0 an 0 0 0 0 0 ...
[aw ap ae 0 an 0 0 0 0 ...
[0 aw ap 0 0 an 0 0 0 ...
[as 0 0 ap ae 0 an 0 0 0 ....
[0 as 0 aw ap ae 0 an 0 0 0 0 ...
and this matrix is multiplied by
[T1,1]
[T1,2]
[T1,3]
[T2,1]
T[2,2]
.
.
.
This is used to solve Ax=T
To find x, I use A\T,
but when the A matrix is really large (1000 x 1000 or even more), the matrix division starts taking up a lot of time, but most of the entries are 0.
I was wondering if there is any way to optimize this to reduce run time, or since it doesnt follow a particular pattern it can't be done?
  6 commentaires
Santosh Fatale
Santosh Fatale le 6 Avr 2022
What is the sparsity of the first matrix (Matrix A) in your case?
What are the dimesion for matrix A and matrix T?
As pointed out Steven, are the variables in matrix A are of type syms?
If possible could you provide the data for matrix A and matrix T?
Walter Roberson
Walter Roberson le 6 Avr 2022
sparse() matrices cannot hold symbolic variables.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by