close loop

2 vues (au cours des 30 derniers jours)
Mohammad Golam Kibria
Mohammad Golam Kibria le 20 Juin 2011
I =
0 0 0 0 0 0 0
0 1 1 0 1 1 0
1 0 1 0 1 0 1
0 1 1 0 1 0 1
0 0 0 0 1 1 0
0 0 0 0 0 0 0
I need how many closed regions in the matrix. Here obviously two.Is there any one to help?

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 20 Juin 2011
B = bwboundaries(I,8,'noholes')

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by