This function was written to calculate the sum of the eight pixels surrounding every individual pixel in an image. This function is useful when simulating contact dependent interactions in cell modeling scenarios.
Matthew Schneck (2020). Immediate_Neighbors(x) (https://www.mathworks.com/matlabcentral/fileexchange/51022-immediate_neighbors-x), MATLAB Central File Exchange. Retrieved .
Fixed bug where matrices of different X and Y dimensions were not calculated properly