Sparse matrix conversion???

6 visualizzazioni (ultimi 30 giorni)
Synchronie
Synchronie il 8 Ott 2011
Is it possible to convert a matrix in the sparse form (using spy(X)) in the block format(ex:X=[1 0 0 1; 0 0 0 1;1 0 0 0;0 0 0 0]) for matrix multiplication???

Risposta accettata

the cyclist
the cyclist il 8 Ott 2011
I am not entirely sure what you are asking for. The sparse() command will convert a matrix to sparse form. [The spy() function is only for visualization.] Whether or not the matrix has a block format is not very relevant, because in sparse form, MATLAB stores the locations and values of the non-zero elements, regardless of where they are. (Or maybe I am misunderstanding something in your question.)

Più risposte (1)

Synchronie
Synchronie il 8 Ott 2011
You are right.. I got it.. I just had to do the matrix multiplication... :-) I thought since it was in sparse format, I would not be able to perform the matrix multiplication..

Categorie

Scopri di più su Sparse Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by