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?

Risposte (1)

Matt J
Matt J il 1 Nov 2021
The spy() command?

7 Commenti

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 il 1 Nov 2021
Modificato: Matt J il 1 Nov 2021
Why can't you read the indices off the spy() plot? Aren't you already doing a visual, interactive search via Excel?
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?
You can just zoom in on those features and read the index ranges off the axes.
Ok .In my opinion ,it is still a tedious and prone to error approach.
To automate it further, you need more criteria for the blocks you are looking for.
I understand your point.Thanks very much for the guidance!

Accedi per commentare.

Richiesto:

il 1 Nov 2021

Commentato:

il 1 Nov 2021

Community Treasure Hunt

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

Start Hunting!

Translated by