I got a 10x10 matrix with a bunch of zeroes and an element of the value 1. I'm trying to create a submatrix with the element of 1 and its surrounding.
Problem:
This is just an example, the element "1" is placed anywhere within the matrix. I do realise I can find my element using find find(MATRIX==1)
.
How do I define my 3x3 submatrix?