Info

This question is closed. Reopen it to edit or answer.

Apply Connectivity concept but not on binary matrix

1 view (last 30 days)
Maheen
Maheen on 6 Aug 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi, I have a Matrix
A=[4 4 4 1 1 0 0;3 3 3 1 1 0 4;3 3 3 2 2 1 1;2 2 2 2 2 1 3]
I want to extract chunks of this matrix, like
[4 4 4], [1 1;1 1], [0 0], [3 3 3;3 3 3], [2 2 2], [2 2;2 2], [1 1], [1], [3]
etc. I have tried to use diff command. But i am unable to extract anything useful. plz help.
  3 Comments
Cedric
Cedric on 6 Aug 2015
Edited: Cedric on 6 Aug 2015
What defines the priority between rows and columns? You could have extracted
[2 2 2 2 2 ] and [2 2]
and you extracted
[2 2 2] and [2 2; 2 2]
Walter Roberson
Walter Roberson on 6 Aug 2015
Are the values integers? Non-negative integers? Do you have the Image Processing Toolkit?

Answers (0)

Community Treasure Hunt

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

Start Hunting!