Extract submatrix from matrix.
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Let's say that we have a matrix ( m x n ). This matrix contains values of 0 and 1. There is a "square shape" inside that matrix that is filled with 1. And another "shape" let's say filled with 1. How can i extract those "shapes" and create 2 separate matrices from them?
0 0 0 0 0 1 1 1
0 1 1 0 0 1 1 1
0 1 1 0 0 0 0 0
0 0 0 0 0 0 0 0
Something like this . How can i create from this matrix only this matrix:
1 1
1 1
And this:
1 1 1
1 1 1
0 comentarios
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!