count_subareas: Count the Number of Ones in Subareas of a Matrix
Description
This function takes a binary matrix (0s and 1s) and divides it into rectangular subareas,
counting the number of ones in each. Subareas are defined by the number of rows and columns
specified by the user. If the matrix dimensions are not perfectly divisible by the subarea size,
edge subareas may be smaller.
Usage
count_subareas(matrix_data, sub_rows, sub_cols)
Value
A matrix where each cell corresponds to a subarea and contains the count of ones.