ImageIN is the input image;
Factor is the aggregation extent;
Algorithm will be mean aggregation for 1, majority (mode) aggregation for 2 and so on.
ABHILASH SINGH (2019). Image Aggregation of the Sentinel 1A images in MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/73187-image-aggregation-of-the-sentinel-1a-images-in-matlab), MATLAB Central File Exchange. Retrieved .
Inspired by: Sentinel 1A image reading and displaying in MATLAB