Find blocks inside a large sparse matrix

I am working with a 3072 x 3072 sparse matrix which supposedly has some structured blocks which are positive definite,some blocks of zero and some unstructured blocks.Right now I have extracted all the non zero indices of the matrix and arranged column indices for every row having non zero values .I am trying to find clusters in these non zero elements by using excel and plotting 25 rows each for columns indices that appear to be closer.Since the matrix is a large one ,this is quite tedious and time consuming.
Could anyone please suggest an efficient way to find and visualize such structure in the matrix?

Respuestas (1)

Matt J
Matt J el 1 de Nov. de 2021

0 votos

The spy() command?

7 comentarios

bashir ud din
bashir ud din el 1 de Nov. de 2021
I am using it to visualize the sparsity pattern.But I am interested to fetch the indices of the blocks so that I can understand where each blocks starts and end and possibly invert a specific block.
Matt J
Matt J el 1 de Nov. de 2021
Editada: Matt J el 1 de Nov. de 2021
Why can't you read the indices off the spy() plot? Aren't you already doing a visual, interactive search via Excel?
bashir ud din
bashir ud din el 1 de Nov. de 2021
I have used find command to get the indices of non zeros but the problem is that they are not continuous in a way to detect blocks from them and I am just plotting them my my intuition,nothing mathematical behind that. My spy plot looks like this
Is it possible to get the indices of theses different patterns separately ,for example the one in the middle,and the small lines at the boundries etc.Is there any command for it?
Matt J
Matt J el 1 de Nov. de 2021
You can just zoom in on those features and read the index ranges off the axes.
bashir ud din
bashir ud din el 1 de Nov. de 2021
Ok .In my opinion ,it is still a tedious and prone to error approach.
Matt J
Matt J el 1 de Nov. de 2021
To automate it further, you need more criteria for the blocks you are looking for.
bashir ud din
bashir ud din el 1 de Nov. de 2021
I understand your point.Thanks very much for the guidance!

Iniciar sesión para comentar.

Preguntada:

el 1 de Nov. de 2021

Comentada:

el 1 de Nov. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by