Sparse matrix conversion???

조회 수: 6 (최근 30일)
Synchronie
Synchronie 2011년 10월 8일
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???

채택된 답변

the cyclist
the cyclist 2011년 10월 8일
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.)

추가 답변 (1개)

Synchronie
Synchronie 2011년 10월 8일
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..

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by