Effacer les filtres
Effacer les filtres

accessing elements in sparse matrix

3 vues (au cours des 30 derniers jours)
Yingke
Yingke le 27 Fév 2012
Dear all
I have 2 very big and very sparse matrix A and B. A and B are correlated, which means that if A(i,j) ~= 0 then B(i,j)~=0 and vice versa. In my program, after accessed A(i,j), then B(i,j) will be accessed. The reason is that 2 sparse matrix is smaller than 1 3D matrix which can't be sparse.
In my impression (only guess) that sparse matrix is essentially a linked list. In order to find A(i,j), we need to traverse all nonzero elements to find the right one. In my case, there are 2 traverse along A and B.
My question is that is it possible to find the real index of A(i,j), and then another traverse in B could be saved.
Thanks a lot in advance.

Réponses (0)

Catégories

En savoir plus sur Sparse Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by