MATLAB Data Analysis

Imagine you have a 2-dimensional matrix with data that can be visualized similar to the ones below, in which lighter colors (i.e., yellow) represent higher intensity and darker colors (i.e., blue) represent lower intensity.
1.If you wanted to use a MATLAB function to find all the places with higher intensity than their surroundings, what would you call this function?
Note: Arrows point at some of these places in the image below this question.
(Required.)
2.If you wanted to use a MATLAB function to find all the places with lower intensity than their surroundings, what would you call this function?
Note: Arrows point at some of these places in the image below this question.
(Required.)