I have a 7×10 matrix of integer values (see attached .mat file). I want to check if a block inside the matrix (lets say 2×2) meets a condition. For example: lets say I want to see if any 2×2 block in the attached matrix all have values of 2. If there is such a 2×2 block within the matrix then return a value of 1 (true), if not return value of 0 (false). In the matrix attached, there is a 2×2 block of 2s so the output of what I am looking for in this example would be 1 (true). I would also like to generalize this for any size block.
MATLAB: Check if sub-block in matrix meets a condition
findMATLABmatrixmatrix manipulation
Related Question
- Remove values from array under min & max conditions and under given number of consecutiveness.
- How to split a large matrix into smaller matrices and assign random values
- Having troubles with resizing matrices in ‘for loop’ and index search.
- How to Obtain the Indeces of the Minimum Value of Each Row in a Matrix and then Apply These Indeces to a New Matrix of the Same Size
- Can anybody please help me to do the following
Best Answer